Skip to content

Commit

Permalink
- Updating build.build.sh and .*ignore files
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Dec 3, 2020
1 parent 70ef6f8 commit d5bd40d
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
3 changes: 3 additions & 0 deletions geonode_mapstore_client/client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
MapStore2
debug.log
node_modules/
node_modules/.staging/
web/
dist/
module/
coverage/
package-lock.json
yarn.lock
8 changes: 8 additions & 0 deletions geonode_mapstore_client/client/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
MapStore2
debug.log
node_modules/
node_modules/.staging/
web/
dist/
module/
coverage/
package-lock.json
yarn.lock
34 changes: 29 additions & 5 deletions geonode_mapstore_client/client/build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
#!/bin/bash
set -e

# npx rimraf package-lock.json npm-shrinkwrap.json node_modules
npm update
npm install
npm run compile
npm run lint
do_npx=0
do_clean_cache=0
do_update=0
do_npm_install=1
do_npm_install_force=0
do_yarn_install=0
do_lint=0
while getopts "xcufnyl" opt
do
case $opt in
(x) do_npx=1 ;;
(c) do_clean_cache=1 ;;
(u) do_update=1 ;;
(f) do_yarn_install=0 ; do_npm_install_force=1 ; do_npm_install=0 ;;
(n) do_yarn_install=0 ; do_npm_install_force=0 ; do_npm_install=1 ;;
(y) do_yarn_install=1 ; do_npm_install_force=0 ; do_npm_install=0 ;;
(l) do_lint=1 ;;
(*) printf "Illegal option '-%s'\n" "$opt" && printf "Example usage: ./build.sh -uyl\n Options:\n\t(x) Cleans node_modules\n\t(c) Cleans npm cache\n\t(u) Runs npn update\n\t(f) Runs npm install --force\n\t(n) Uses npm install instead of yarn\n\t(y) Uses yarn install instead of npm\n\t(l) Runs lint\n" && exit 1 ;;
esac
done

(( do_npx )) && printf " - Cleaning node_modules...\n" && npx rimraf package-lock.json npm-shrinkwrap.json node_modules
(( do_clean_cache )) && printf " - Cleaning npm cache...\n" && npm cache clean --force && npm install -g npm@latest --force && npm cache clean --force
(( do_update )) && printf " - Executing npm update...\n" && npm update
(( do_npm_install )) && printf " - Executing npm install...\n" && npm install
(( do_npm_install_force )) && printf " - Forcing npm install...\n" && npm install --force
(( do_yarn_install )) && printf " - Executing yarn update...\n" && yarn install
printf " - Executing npm run compile...\n" && npm run compile
(( do_lint )) && printf " - Executing npm run lint...\n" && npm run lint

0 comments on commit d5bd40d

Please sign in to comment.