mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
install grunt-newer to run uglify only for targets with changed files
This commit is contained in:
parent
8d8cb48da3
commit
3377ef0483
10
Gruntfile.js
10
Gruntfile.js
@ -14,12 +14,13 @@
|
|||||||
* sudo npm install -g grunt-cli
|
* sudo npm install -g grunt-cli
|
||||||
* npm install grunt --save-dev
|
* npm install grunt --save-dev
|
||||||
* npm install grunt-contrib-uglify --save-dev
|
* npm install grunt-contrib-uglify --save-dev
|
||||||
|
* npm install grunt-newer --save-dev
|
||||||
*
|
*
|
||||||
* Building happens by running in your EGroupware directory:
|
* Building happens by running in your EGroupware directory:
|
||||||
*
|
*
|
||||||
* grunt
|
* grunt # runs uglify for all targets with changed files
|
||||||
* or
|
* or
|
||||||
* grunt uglify:<target> # targets: api, et2, pixelegg, mobile, mail, calendar, ...
|
* grunt [newer:]uglify:<target> # targets: api, et2, pixelegg, mobile, mail, calendar, ...
|
||||||
*
|
*
|
||||||
* app.js files can be added like mail target or, if you want automatic dependencies,
|
* app.js files can be added like mail target or, if you want automatic dependencies,
|
||||||
* you need to add them in egw_framework::$bundle2minurl and egw_framework::get_bundles().
|
* you need to add them in egw_framework::$bundle2minurl and egw_framework::get_bundles().
|
||||||
@ -255,6 +256,9 @@ module.exports = function (grunt) {
|
|||||||
// Load the plugin that provides the "uglify" task.
|
// Load the plugin that provides the "uglify" task.
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
|
|
||||||
|
// Load the plugin that runs tasks only on modified files
|
||||||
|
grunt.loadNpmTasks('grunt-newer');
|
||||||
|
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('default', ['uglify']);
|
grunt.registerTask('default', ['newer:uglify']);
|
||||||
};
|
};
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
"repository": {},
|
"repository": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "^0.4.5",
|
"grunt": "^0.4.5",
|
||||||
"grunt-contrib-uglify": "^0.11.1"
|
"grunt-contrib-uglify": "^0.11.1",
|
||||||
|
"grunt-newer": "^1.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user