Make grunt build compatible with latest version of npm

development
Brendon Boshell 2017-03-09 12:37:04 +00:00
parent 1a6adcc7d8
commit 7c794d24dc
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
var path = require("path"),
fs = require("fs"),
parentFolderName = path.basename(path.resolve('..')),
mxClientContent,
deps;
@ -88,9 +89,7 @@ module.exports = function (grunt) {
},
});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-webpack');
grunt.loadNpmTasks('grunt-contrib-concat');
require(parentFolderName === "node_modules" ? "load-grunt-parent-tasks" : "load-grunt-tasks")(grunt);
grunt.registerTask("default", [
"copy",
"concat",

View File

@ -3,13 +3,15 @@
"version": "3.7.1",
"main": "./javascript/dist/build.js",
"scripts": {
"install": "grunt build"
"postinstall": "grunt build"
},
"dependencies": {
"grunt": "^1.0.1",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-webpack": "^2.0.1",
"load-grunt-parent-tasks": "^0.1.1",
"load-grunt-tasks": "^3.5.2",
"webpack": "^2.2.1"
}
}