Skip to content

Commit

Permalink
Switch to using npm scripts instead of grunt (#160)
Browse files Browse the repository at this point in the history
* Remove coveralls task from grunt

* removed testing and coverage from grunt

* Removed unneed npm deps

* Updated docs to remove grunt references

* Added npm version scripts & removed Grunt
  • Loading branch information
aydrian authored Aug 24, 2016
1 parent f012ac1 commit 0d2afd1
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 101 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
language: node_js
node_js:
- '4'
- '5'
- '6'
before_install: npm install -g grunt-cli
install: npm install
script: "npm run-script ci"
- '4'
- '5'
- '6'
after_success:
- npm run coveralls
notifications:
slack:
secure: dsz+D/TuylEi+6zqdB5dVqyMlpbpafaBBcAwYIijTK6LuG8KdIdGNSFVX1ro6o3bJFwMvtfxNeK1eFrMy8l6VHZQL0dkXWRmCl/pxLhEntUiYTDwDOtiqy1QLZtv5AqtsdSr1qLiOJtgF6gXk66xipnV2UzjLVVoxzSrdOSnX4U=
22 changes: 20 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ Current milestone Pull Requests will receive priority review for merging.
3. Write corresponding tests and code (only what is needed to satisfy the issue and tests please)
* Include your tests in the 'test' directory in an appropriate test file
* Write code to satisfy the tests
* Run tests using ```grunt test```
* Run tests using ```npm test```
5. Ensure automated tests pass
6. Submit a new Pull Request applying your feature/fix branch to the develop branch of the SparkPost SDK
6. Submit a new Pull Request applying your feature/fix branch to the develop branch of the SparkPost client library

## Releases
If you are a collaborator, when you want release a new version, follow these steps.

1. Make sure all the changes are merged into master
2. Make sure all changes have passed [Travis CI build][1]
3. Determine type of release. We use [Semantic Versioning](http://semver.org/).
4. Update [CHANGELOG.md](CHANGELOG.md) with release notes and commit
5. Run `npm version` command to increment `package.json` version, commit changes, tag changes, and push to upstream.
- Patch -> `npm version patch`
- Minor -> `npm version minor`
- Major -> `npm version major`
6. Once [Travis CI build][1] (from tag) has completed, make sure you're working directory is clean and run `npm publish`
while in the project root.
7. Create a new [Github Release](https://github.com/SparkPost/node-sparkpost/releases) using the new tag. Copy release
notes from the [CHANGELOG.md](CHANGELOG.md).

[1]: https://travis-ci.org/SparkPost/node-sparkpost
74 changes: 0 additions & 74 deletions Gruntfile.js

This file was deleted.

8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,15 @@ Click on the desired API to see usage and more information
## Development

### Setup
We use [Grunt](http://gruntjs.com/) for our task runner, so you will also have to install Grunt globally `npm install -g grunt-cli`

Run `npm install` inside the repository to install all the dev dependencies.

### Testing
Once all the dependencies are installed, you can execute the unit tests using `grunt test`
Once all the dependencies are installed, you can execute the unit tests using `npm test`

### Contributing
[Guidelines for adding issues](docs/ADDING_ISSUES.markdown)
[Guidelines for adding issues](docs/ADDING_ISSUES.md)

[Our coding standards](docs/CODE_STYLE_GUIDE.markdown)
[Our coding standards](docs/CODE_STYLE_GUIDE.md)

[Submitting pull requests](CONTRIBUTING.md)

Expand Down
File renamed without changes.
File renamed without changes.
22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"description": "A Node.js wrapper for interfacing with your favorite SparkPost APIs",
"main": "./lib/sparkpost.js",
"scripts": {
"lint": "eslint --fix lib/**",
"test": "grunt",
"ci": "grunt && grunt coveralls:grunt_coveralls_coverage"
"coveralls": "cat ./test/reports/lcov.info | coveralls",
"pretest": "eslint lib/**",
"test": "istanbul cover --report lcov --dir test/reports/ _mocha --recursive ./test/spec --grep ./test/**/*.spec.js -- --colors --reporter spec",
"postversion": "git push upstream && git push --tags upstream"
},
"keywords": [
"email",
Expand All @@ -24,21 +25,14 @@
"homepage": "https://github.com/SparkPost/node-sparkpost",
"devDependencies": {
"chai": "1.9.1",
"coveralls": "^2.11.12",
"eslint": "^3.3.1",
"eslint-config-sparkpost": "^1.0.1",
"grunt": "0.4.5",
"grunt-bump": "^0.3.1",
"grunt-coveralls": "^1.0.0",
"grunt-shell": "1.1.1",
"istanbul": "0.3.2",
"matchdep": "0.3.0",
"mocha": "1.21.4",
"istanbul": "^0.4.5",
"mocha": "^3.0.2",
"nock": "^7.2.2",
"proxyquire": "1.0.1",
"sinon": "^1.14.1",
"sinon-chai": "2.5.0",
"time-grunt": "1.0.0",
"xunit-file": "0.0.5"
"sinon-chai": "2.5.0"
},
"dependencies": {
"json-pointer": "^0.5.0",
Expand Down

0 comments on commit 0d2afd1

Please sign in to comment.