Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Add grunt-cli as a dependency.
Browse files Browse the repository at this point in the history
Rather than requiring users install grunt-cli globally (which can introduce
version problems), we'll be explicit that it's a dependency. Since grunt may
not be in the global env anymore, we'll also switch to using package.json's
`scripts` attr.

This bumps out version to 8.4.2 in preparation of our next release.

It resolves #508
  • Loading branch information
CM Lubinski committed May 14, 2018
1 parent bcbe66e commit 05ae96b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion frontendbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ if [ ! -f config.json ]; then
fi

npm install --quiet
grunt build-dist
npm run grunt build-dist
2 changes: 1 addition & 1 deletion regulations/static/config/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion regulations/static/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "regulations-site",
"version": "8.4.0",
"version": "8.4.2",
"homepage": "https://eregs.github.io/",
"contributors": [
{
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -94,6 +95,9 @@
"underscore": "^1.8.3",
"urijs": "^1.18.10"
},
"scripts": {
"grunt": "grunt"
},
"config": {
"travis-cov": {
"threshold": 70
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ whitelist_externals = sh

[testenv:jstests]
deps =
commands = grunt test-js
commands = npm run grunt test-js
skip_install = True
skipsdist = True
whitelist_externals = grunt
whitelist_externals = npm

[testenv:integration]
deps =
Expand Down

0 comments on commit 05ae96b

Please sign in to comment.