Make grunt build compatible with latest version of npm
parent
1a6adcc7d8
commit
7c794d24dc
|
@ -1,5 +1,6 @@
|
||||||
var path = require("path"),
|
var path = require("path"),
|
||||||
fs = require("fs"),
|
fs = require("fs"),
|
||||||
|
parentFolderName = path.basename(path.resolve('..')),
|
||||||
mxClientContent,
|
mxClientContent,
|
||||||
deps;
|
deps;
|
||||||
|
|
||||||
|
@ -88,9 +89,7 @@ module.exports = function (grunt) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
require(parentFolderName === "node_modules" ? "load-grunt-parent-tasks" : "load-grunt-tasks")(grunt);
|
||||||
grunt.loadNpmTasks('grunt-webpack');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
|
||||||
grunt.registerTask("default", [
|
grunt.registerTask("default", [
|
||||||
"copy",
|
"copy",
|
||||||
"concat",
|
"concat",
|
||||||
|
|
|
@ -3,13 +3,15 @@
|
||||||
"version": "3.7.1",
|
"version": "3.7.1",
|
||||||
"main": "./javascript/dist/build.js",
|
"main": "./javascript/dist/build.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "grunt build"
|
"postinstall": "grunt build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
"grunt-contrib-concat": "^1.0.1",
|
"grunt-contrib-concat": "^1.0.1",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
"grunt-webpack": "^2.0.1",
|
"grunt-webpack": "^2.0.1",
|
||||||
|
"load-grunt-parent-tasks": "^0.1.1",
|
||||||
|
"load-grunt-tasks": "^3.5.2",
|
||||||
"webpack": "^2.2.1"
|
"webpack": "^2.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue