diff --git a/.travis.yml b/.travis.yml index 480072ab7..1ca0759f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,6 @@ before_install: - nvm use 6.9.2 install: - pip install tox-travis - - npm install -g grunt-cli script: - ./frontendbuild.sh - if [ "$INTEGRATION_TESTS" = "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./devops/integration-tests.sh; else tox; fi diff --git a/Dockerfile b/Dockerfile index bdfdef2f2..10b443e8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,6 @@ RUN apt-get update \ && apt-get install -y $PIP_PACKAGE \ && rm -rf /var/lib/apt/lists/* RUN $PIP_CMD install --upgrade pip setuptools -RUN npm install --quiet -g grunt-cli COPY ["manage.py", "package.json", "example-config.json", "setup.py", "frontendbuild.sh", "Gruntfile.js", ".babelrc", ".eslintignore", ".eslintrc", "/app/src/"] COPY ["regulations", "/app/src/regulations"] diff --git a/README.md b/README.md index c43d992bd..3e5e387e5 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,6 @@ line interface using npm: ```sh cd regulations-site npm install -npm install -g grunt-cli ``` Once all of the above is complete, you may run tests and linting across @@ -126,10 +125,10 @@ There are a number of tasks configured in [Gruntfile.js](Gruntfile.js). On the last lines, you will find tasks that group subtasks into common goals. These include: -* `grunt test` runs JS lint and unit tests. -* `grunt mocha_stanbul` runs only JS unit tests. -* `grunt build-dev` builds a development version of the frontend assets. -* `grunt build-dist` or just `grunt` builds a production version of the +* `npm run grunt test` runs JS lint and unit tests. +* `npm run grunt mocha_stanbul` runs only JS unit tests. +* `npm run grunt build-dev` builds a development version of the frontend assets. +* `npm run grunt build-dist` or just `grunt` builds a production version of the frontend assets (including minification, etc.) ## Integration tests diff --git a/frontendbuild.sh b/frontendbuild.sh index ffe47800c..ce95f93cf 100755 --- a/frontendbuild.sh +++ b/frontendbuild.sh @@ -7,4 +7,4 @@ if [ ! -f config.json ]; then fi npm install --quiet -grunt build-dist +npm run grunt build-dist diff --git a/regulations/static/config/npm-shrinkwrap.json b/regulations/static/config/npm-shrinkwrap.json index 18a78713f..7e5d6e359 100644 --- a/regulations/static/config/npm-shrinkwrap.json +++ b/regulations/static/config/npm-shrinkwrap.json @@ -1,6 +1,6 @@ { "name": "regulations-site", - "version": "8.1.0", + "version": "8.4.2", "dependencies": { "argparse": { "version": "1.0.9", diff --git a/regulations/static/config/package.json b/regulations/static/config/package.json index e9180644c..1903cb625 100644 --- a/regulations/static/config/package.json +++ b/regulations/static/config/package.json @@ -1,6 +1,6 @@ { "name": "regulations-site", - "version": "8.4.0", + "version": "8.4.2", "homepage": "https://eregs.github.io/", "contributors": [ { @@ -47,6 +47,7 @@ "expect.js": "~0.2.0", "grunt": "^0.4.5", "grunt-browserify": "^5.0.0", + "grunt-cli": "^1.2.0", "grunt-contrib-copy": "^1.0.0", "grunt-contrib-cssmin": "^1.0.1", "grunt-env": "^0.4.4", @@ -94,6 +95,9 @@ "underscore": "^1.8.3", "urijs": "^1.18.10" }, + "scripts": { + "grunt": "grunt" + }, "config": { "travis-cov": { "threshold": 70