Skip to content

Commit

Permalink
See pewresearch/pewresearch-org@74f7258 from refs/heads/main
Browse files Browse the repository at this point in the history
  • Loading branch information
prcdevgitbot committed May 15, 2024
1 parent 4f0c0b9 commit 5558bde
Show file tree
Hide file tree
Showing 194 changed files with 305,942 additions and 364 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # yarn
directory: "/src"
schedule:
interval: "weekly"
target-branch: "develop"
labels:
- "dependencies"
- "🤖"
33 changes: 10 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# ignore everything in the root except the "wp-content" directory.
!wp-content/

# ignore everything in the "wp-content" directory, except:
# "mu-plugins", "plugins", "themes" directory
wp-content/*
!wp-content/mu-plugins/
!wp-content/plugins/
!wp-content/themes/

# ignore these plugins
wp-content/plugins/hello.php

# ignore specific themes
wp-content/themes/twenty*/

# ignore node dependency directories
node_modules/

# ignore log files and databases
*.log
*.sql
*.sqlite
# Yarn v2

.pnp.*
.yarn/*
src/*/*/.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
12 changes: 12 additions & 0 deletions .gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/ingydotnet/git-subrepo#readme
;
[subrepo]
remote = prc-scripts
branch = develop
commit = d4554740f7f46bac440ea42266a09eb618e8616b
parent = dbed4f92715006c763a009871788aad275602f74
method = merge
cmdver = 0.4.6
61 changes: 61 additions & 0 deletions .scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/bin/bash
echo "Running build all script"
echo "This will clear the node_modules and package-lock.json files and run npm install and npm build in all the directories that contain a src/&/package.json file, a fresh start for all the scripts."
# Start at the /src directory
cd src || exit

# Loop through all the directories in /@prc that have a package.json, so /@prc/*/package.json
for dir in $(find ./@prc -mindepth 1 -maxdepth 1 -type d -exec test -e '{}/package.json' ';' -print); do
echo "Building..."
echo "$dir..."
# Go to the directory
cd $dir || exit

### Check for package-lock.json and if exists delete it
if [ -f "package-lock.json" ]; then
echo "Deleting package-lock.json in $dir"
rm package-lock.json
fi
## Check for node_modules
if [ ! -d "node_modules" ]; then
echo "Running npm install in $dir"
npm install
fi
# Run npm build
echo "Running npm build in $dir"
npm run build
# Delete the node_modules directory
# We delete the node_modules directory because they're large, clean up as we go.
echo "Deleting node_modules in $dir"
rm -rf node_modules
# Go back to the /blocks directory
cd - || exit
done

# Loop through all the directories in /third-pary that have a package.json, so /third-party/*/package.json
for dir in $(find ./third-party -mindepth 1 -maxdepth 1 -type d -exec test -e '{}/package.json' ';' -print); do
echo "Building..."
echo "third-party scripts..."
# Go to the directory
cd $dir || exit

### Check for package-lock.json and if exists delete it
if [ -f "package-lock.json" ]; then
echo "Deleting package-lock.json in $dir"
rm package-lock.json
fi
## Check for node_modules
if [ ! -d "node_modules" ]; then
echo "Running npm install in $dir"
npm install
fi
# Run npm build
echo "Running npm build in $dir"
npm run build
# Delete the node_modules directory
# We delete the node_modules directory because they're large, clean up as we go.
echo "Deleting node_modules in $dir"
rm -rf node_modules
# Go back to the /blocks directory
cd - || exit
done
32 changes: 32 additions & 0 deletions .scripts/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Start at the /src directory
cd src || exit

# Find all directories that contain a src/*/package.json file
for dir in $(find ./@prc -mindepth 1 -maxdepth 1 -type d -exec test -e '{}/package.json' ';' -print); do
# Go to the directory
cd $dir || exit
## Check for node_modules
# Delete the node_modules directory
if [ ! -d "node_modules" ]; then
echo "Deleting node_modules in $dir"
rm -rf node_modules
fi
# Go back to the /src directory
cd - || exit
done

# Find all directories that contain a src/*/package.json file
for dir in $(find ./third-party -mindepth 1 -maxdepth 1 -type d -exec test -e '{}/package.json' ';' -print); do
# Go to the directory
cd $dir || exit
## Check for node_modules
# Delete the node_modules directory
if [ ! -d "node_modules" ]; then
echo "Deleting node_modules in $dir"
rm -rf node_modules
fi
# Go back to the /src directory
cd - || exit
done
Loading

0 comments on commit 5558bde

Please sign in to comment.