From ea9b6eaa2f642c024688145d41f5d522bf8c8e82 Mon Sep 17 00:00:00 2001 From: Nathan Woltman Date: Sat, 5 Aug 2017 22:27:07 -0400 Subject: [PATCH] Replace grunt with npm scripts --- .travis.yml | 1 + Gruntfile.js | 51 --------------------------------------------------- package.json | 16 +++++++--------- 3 files changed, 8 insertions(+), 60 deletions(-) delete mode 100644 Gruntfile.js diff --git a/.travis.yml b/.travis.yml index b54199f..f63b5ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ node_js: - '4' - '6' - '7' +after_success: npm run coveralls deploy: provider: npm email: nwoltman@outlook.com diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 79ce129..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,51 +0,0 @@ -/* eslint-disable camelcase, global-require */ - -'use strict'; - -module.exports = function(grunt) { - require('jit-grunt')(grunt); - - grunt.initConfig({ - eslint: { - all: ['*.js', 'test/*.js'], - }, - - mochaTest: { - test: { - src: 'test/*.js', - }, - options: { - colors: true, - }, - }, - - mocha_istanbul: { - coverage: { - src: 'test/*.js', - options: { - reportFormats: ['html'], - }, - }, - coveralls: { - src: 'test/*.js', - options: { - coverage: true, - reportFormats: ['lcovonly'], - }, - }, - options: { - mochaOptions: ['--colors'], - }, - }, - }); - - grunt.event.on('coverage', (lcov, done) => { - require('coveralls').handleInput(lcov, done); - }); - - // Register tasks - grunt.registerTask('lint', ['eslint']); - grunt.registerTask('test', [process.env.CI ? 'mocha_istanbul:coveralls' : 'mochaTest']); - grunt.registerTask('coverage', ['mocha_istanbul:coverage']); - grunt.registerTask('default', ['lint', 'test']); -}; diff --git a/package.json b/package.json index 9aa644a..c235439 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,6 @@ "engines": { "node": ">=4" }, - "scripts": { - "test": "grunt" - }, "repository": { "type": "git", "url": "git+https://github.com/nwoltman/node-uid-generator.git" @@ -35,13 +32,14 @@ "homepage": "https://github.com/nwoltman/node-uid-generator", "devDependencies": { "coveralls": "^2.11.15", - "grunt": "^1.0.1", - "grunt-eslint": "^19.0.0", - "grunt-mocha-istanbul": "^5.0.2", - "grunt-mocha-test": "^0.13.2", - "istanbul": "^0.4.5", - "jit-grunt": "^0.10.0", + "eslint": "^4.4.0", "mocha": "^3.1.2", + "nyc": "^11.1.0", "should": "^11.1.1" + }, + "scripts": { + "lint": "eslint index.js test/*.js", + "test": "eslint index.js test/*.js && nyc --reporter=html --reporter=text-summary mocha", + "coveralls": "nyc report --reporter=text-lcov | coveralls" } }