snap.js/Gruntfile.js

48 lines
1.4 KiB
JavaScript
Raw Normal View History

2013-08-05 08:04:30 +00:00
module.exports = function(grunt) {
var pkg = grunt.file.readJSON("package.json");
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: pkg,
2013-09-02 04:26:51 +00:00
banner: grunt.file.read("./src/copy.js")
2013-08-05 08:04:30 +00:00
.replace(/@VERSION/, pkg.version)
.replace(/@DATE/, grunt.template.today("yyyy-mm-dd")) + "\n",
// Task configuration.
uglify: {
options: {
banner: "<%= banner %>",
report: "min"
},
dist: {
src: "<%= concat.target.dest %>",
dest: "dist/" + pkg.name.toLowerCase() + "-min.js"
2013-08-05 08:04:30 +00:00
}
},
concat: {
options: {
banner: "<%= banner %>"
},
target: {
dest: "dist/" + pkg.name.toLowerCase() + ".js",
2013-08-05 08:04:30 +00:00
src: [
2013-08-16 01:20:48 +00:00
"./third-party/eve/eve.js",
2013-08-27 00:43:48 +00:00
"./src/mina.js",
"./third-party/elemental.js",
2013-08-27 00:43:48 +00:00
"./src/svg.js",
"./src/path.js",
"./src/set.js",
"./src/equal.js",
"./src/mouse.js",
"./src/filter.js"
2013-08-05 08:04:30 +00:00
]
}
}
});
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.registerTask("default", ["concat", "uglify"]);
};