forked from suifan/s3lyg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
30 lines (24 loc) · 1.04 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require("./_tasks/_lib/ix.js");
module.exports = function (grunt) {
var prjCfg = require('./ixw_config.js');
prjCfg.relNo = IX.getTimeStrInMS().substring(2, 13).replace("T", "");
grunt.initConfig(IX.inherit({
pkg : grunt.file.readJSON("./package.json"),
}, prjCfg.grunt));
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-less");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-cssmin");
["preless", "premap", "deploy", "release"].forEach(function(taskName){
grunt.registerTask(taskName, 'Initialize project base on ixw_config.json.', function() {
var taskEntry = require("./_tasks/" + taskName + "/index.js");
taskEntry(grunt, prjCfg, this.async());
});
});
grunt.registerTask("publish", ["deploy", "release"]);
grunt.registerTask("deployToServer", ["deploy", "copy:dup"]);
grunt.registerTask('default', prjCfg.defaultTasks || ["deploy"]);
};