Skip to content

Commit

Permalink
Build assets during plugin build
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeyarce committed Apr 20, 2024
1 parent c78d26b commit 9ba02ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/build-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ rsync -av --progress . build/wp-job-manager --exclude build --exclude node_modul
# Navigate to build directory
cd build/wp-job-manager

# Step 3: Run composer install without development dependencies
# Step 3: Build assets
npm run build:assets

# Step 4: Run composer install without development dependencies
composer install --no-dev

# Step 4: Zip the entire contents of the build folder into `wp-job-manager.zip` excluding the files from the exclude.lst file
# Step 5: Zip the entire contents of the build folder into `wp-job-manager.zip` excluding the files from the exclude.lst file
# Navigate one level up, so the zip command includes the build directory content
cd ..
zip -r wp-job-manager.zip wp-job-manager -x@../scripts/exclude.lst

# Step 5: Remove the contents of the build folder except the new zip file
# Step 6: Remove the contents of the build folder except the new zip file
rm -rf wp-job-manager

echo "Build process complete. The wp-job-manager.zip file is ready in the /build folder."

0 comments on commit 9ba02ad

Please sign in to comment.