diff --git a/bin/build b/bin/build index 5bc52d532c6b7b2ccbcb836029522cb839bac5e7..dc7cbd4e25833c82b701ef69deff51ca80f122ef 100755 --- a/bin/build +++ b/bin/build @@ -17,16 +17,19 @@ version() { fi } -frontend() { - if [ -z ${WEBPACK_OPTS+x} ]; then - WEBPACK_OPTS="-p" - fi - +npm-install() { echo "Running 'npm install' to download javascript dependencies..." && - npm install && + npm install +} + +frontend() { + echo "Running 'webpack -p' to assemble and minify frontend assets..." && + ./node_modules/.bin/webpack -p +} - echo "Running 'webpack $WEBPACK_OPTS' to assemble and minify frontend assets..." && - ./node_modules/.bin/webpack $WEBPACK_OPTS +frontend-fast() { + echo "Running 'webpack' to assemble and minify frontend assets..." && + ./node_modules/.bin/webpack --devtool eval } sample-dataset() { @@ -44,7 +47,7 @@ uberjar() { } all() { - version && frontend && sample-dataset && uberjar + version && npm-install && frontend && sample-dataset && uberjar } # Default to running all but let someone specify one or more sub-tasks to run instead if desired diff --git a/bin/ci b/bin/ci index 0d287df1c7ca62c97f8ff6840eaf1426ae00af43..da9bce0bff179262d57f245f96582c3b42068f52 100755 --- a/bin/ci +++ b/bin/ci @@ -6,6 +6,6 @@ case $CIRCLE_NODE_INDEX in 2) ENGINES=h2,postgres,sqlite,crate MB_DB_TYPE=mysql MB_DB_DBNAME=circle_test MB_DB_PORT=3306 MB_DB_USER=ubuntu MB_DB_HOST=localhost lein test ;; 3) ENGINES=h2,redshift,druid lein test ;; 4) lein eastwood && lein bikeshed && lein docstring-checker && ./bin/reflection-linter ;; - 5) npm install && npm run lint && npm run test ;; - 6) WEBPACK_OPTS="" ./bin/build && npm run test-e2e ;; + 5) npm run lint && npm run test ;; + 6) ./bin/build version frontend-fast sample-dataset uberjar && npm run test-e2e ;; esac diff --git a/circle.yml b/circle.yml index 4ad14e9b7dc9a3d3634d9efa46cbc7d0ba62302e..26dd918436142752dfc593e05b1b9d5eb0a3d080 100644 --- a/circle.yml +++ b/circle.yml @@ -24,8 +24,8 @@ dependencies: - sudo service crate restart - lein deps - pip install awscli==1.7.3 - - npm cache clean - npm install -g npm@2.15.9 + - npm install database: post: # MySQL doesn't load named timezone information automatically, you have to run this command to load it