From 62edd07c23f72eeac692bda6da7d0bd79cee9ced Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Thu, 22 Sep 2016 08:58:47 -0700 Subject: [PATCH] Move uglify invocation into npm scripts and remove grunt --- Gruntfile.js | 26 -------------------------- package.json | 10 ++++------ 2 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 Gruntfile.js diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 49f9477b..00000000 --- a/Gruntfile.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = function(grunt) { - var libs = "client/js/libs/**/*.js"; - grunt.initConfig({ - watch: { - files: libs, - tasks: ["uglify"] - }, - uglify: { - options: { - sourceMap: true, - compress: false - }, - js: { - files: { - "client/js/libs.min.js": libs - } - } - } - }); - grunt.loadNpmTasks("grunt-contrib-uglify"); - grunt.loadNpmTasks("grunt-contrib-watch"); - grunt.registerTask( - "default", - ["uglify"] - ); -}; diff --git a/package.json b/package.json index 8977ae62..45139ef8 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ "scripts": { "coverage": "istanbul cover node_modules/mocha/bin/_mocha -r test/fixtures/env.js test/**/*.js", "start": "node index", - "build": "npm run build:font-awesome && npm run build:grunt && npm run build:handlebars", + "build": "npm-run-all build:*", "build:font-awesome": "node scripts/build-fontawesome.js", - "build:grunt": "grunt", + "build:libs": "uglifyjs client/js/libs/*.js client/js/libs/jquery/*.js client/js/libs/handlebars/*.js -o client/js/libs.min.js --source-map client/js/libs.min.js.map --source-map-url libs.min.js.map -p relative", "build:handlebars": "handlebars client/views/ -e tpl -f client/js/lounge.templates.js", "test": "npm-run-all -c test:mocha lint", "test:mocha": "mocha -r test/fixtures/env.js test/**/*.js", @@ -64,13 +64,11 @@ "chai": "3.5.0", "eslint": "2.11.1", "font-awesome": "4.6.3", - "grunt": "1.0.1", - "grunt-contrib-uglify": "1.0.1", - "grunt-contrib-watch": "1.0.0", "handlebars": "4.0.5", "istanbul": "0.4.3", "mocha": "2.4.5", "npm-run-all": "2.1.1", - "stylelint": "6.6.0" + "stylelint": "6.6.0", + "uglify-js": "2.7.3" } }