Skip to content

Commit

Permalink
Exclude files from distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
TorbenLundsgaard committed Sep 21, 2023
1 parent 26515a9 commit 09dfe0e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .distignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
/.wordpress-org
/.git
/.github
/bin
/bundled
/node_modules
.babelrc
.distignore
.editorconfig
.gitignore
gulpfile.babel.js
composer.json
composer.lock
package.json
package-lock.json
postcss.config.js
README.md
tailwind.config.js
18 changes: 18 additions & 0 deletions bin/zip-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh


# Get the current directory
current_dir=$(pwd)

# Extract the last directory from the current path
base_dir=$(basename "$current_dir")

# Check if the base directory is 'bin'
if [ "$base_dir" = "bin" ]; then
cd ..
fi

rm ./bundled/gtm-kit.zip
zip -rq ./bundled/gtm-kit.zip * -x "node_modules/*" -x "bin/*" -x "bundled/*" -x "**/.*" -x gulpfile.babel.js -x package.json -x package-lock.json -x tailwind.config.js -x "composer.*" -x "*.dist" -x postcss.config.js -x README.md

Echo Done
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"i18n:textdomain": "wpi18n addtextdomain",
"i18n:pot": "wp i18n make-pot ./ languages/gtm-kit.pot",
"change-version": "./bin/change-version.sh $npm_package_version",
"zip-package": "zip -rq ./bundled/gtm-kit.zip * -x \"node_modules/*\" -x \"bin/*\" -x \"bundled/*\" -x \"**/.*\" -x gulpfile.babel.js -x package.json -x package-lock.json -x tailwind.config.js -x phpstan.neon.dist -x postcss.config.js -x README.md",
"zip-package": "./bin/zip-package.sh",
"compile:sass": "sass src/scss/admin.scss:assets/css/admin.css",
"compile:tailwind": "npx tailwindcss -i ./src/scss/tailwind.scss -o ./src/scss/tailwind-compiled.scss --watch",
"uglify:woocommerce": "mkdirp assets/js && uglifyjs src/js/woocommerce.js --compress --mangle --output assets/js/woocommerce.js",
Expand Down

0 comments on commit 09dfe0e

Please sign in to comment.