Skip to content

Commit

Permalink
Update node dependencies
Browse files Browse the repository at this point in the history
Use NPM scripts to run coffeelint

- Update coffeelint to 2.1.0

  Also update Coffeescript and explictly depends on version 2,
  Use `undefined` as default argument instead of null, it's breaking
  changes on Coffescript 2.

  See:
    - https://coffeescript.org/#breaking-changes-default-values
    - jashkenas/coffeescript#2201

- Remove grunt and its plugins

  inlcude grunt-coffeelint, grunt-contrib-coffee and grunt-mocha-cov,
  Remove Gruntfile.coffee by using NPM scripts, and remove path of "npm bin"
  in scripts, Because the command of "npm run" adds node_modules/.bin to the
  PATH provided to scripts automatically.

- Update vulnerable dependencies

  include socket.io, chokidar

- Explictly depends on mocha

  Add --exit flag

  "By default, Mocha will no longer force the process to exit once all
  tests complete. This means any test code (or code under test) which
  would normally prevent node from exiting will do so when run in Mocha.
  Supply the --exit flag to revert to pre-v4.0.0 behavior"

  mochajs/mocha#2879
  https://mochajs.org/#-exit

- Use c8 to output coverage instead of blanket
- Add generate-examples scripts

  To replace 'gen-examples' task defined in Gruntfile
  • Loading branch information
Gasol committed May 14, 2019
1 parent e4f77ed commit 6b528fc
Show file tree
Hide file tree
Showing 10 changed files with 1,699 additions and 1,990 deletions.
6 changes: 6 additions & 0 deletions .c8rc.json
@@ -0,0 +1,6 @@
{
"exclude": [
".mocharc.js",
"test/**.coffee"
]
}
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
.idea
/coverage
/cache
node_modules
npm-debug.log
Expand Down
6 changes: 6 additions & 0 deletions .mocharc.js
@@ -0,0 +1,6 @@
module.exports = {
require: 'coffeescript/register',
extension: 'coffee',
exit: true,
timeout: 3000
};
4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -15,7 +15,5 @@ addons:
- gcc-4.8
- g++-4.8
env: CXX="g++-4.8" CC="gcc-4.8"
before_install:
- npm install -g grunt-cli
after_script:
- grunt coveralls
- npm run coveralls
71 changes: 0 additions & 71 deletions Gruntfile.coffee

This file was deleted.

2 changes: 1 addition & 1 deletion bin/aglio.js
Expand Up @@ -2,7 +2,7 @@

process.title = 'aglio';

require('../lib/bin').run(null, function(err){
require('../lib/bin').run(undefined, function(err){
if(err){
process.exit(1);
}
Expand Down
9 changes: 9 additions & 0 deletions coffeelint.json
@@ -0,0 +1,9 @@
{
"indentation": {
"value": 4
},
"max_line_length": {
"value": 120,
"level": "warn"
}
}

0 comments on commit 6b528fc

Please sign in to comment.