Browse Source

Merge pull request #621 in VISUAL/fineui from ~TELLER/fineui:master to master

* commit 'f99c377e3d0818f7002e0a5043af84d48ecea8ca':
  update
es6
Teller 6 years ago
parent
commit
02d4817e59
  1. 23
      Gruntfile.js
  2. 4
      package.json

23
Gruntfile.js

@ -215,6 +215,8 @@ module.exports = function (grunt) {
}
},
less: {
demo: {
expand: true,
@ -254,7 +256,7 @@ module.exports = function (grunt) {
uglify: {
options: {
banner: "/*! <%= pkg.name %> <%= grunt.template.today(\"dd-mm-yyyy\") %> */\n"
banner: "/*! <%= pkg.name %> <%= grunt.template.today(\"yyyy-mm-dd HH:MM:ss\") %> */\n"
},
dist: {
files: {
@ -294,6 +296,23 @@ module.exports = function (grunt) {
}
}
},
copy: {
js: {
files: [
{
expand: true,
cwd: "dist",
src: [
"fineui.js"
],
dest: "dist/",
rename: function (dest, src) {
return dest + src.replace(".js", ".min.js");
}
}
]
}
},
watch: {
scripts: {
files: ["src/**/*.js", "src/**/*.less", "demo/js/**/*.js", "demo/version.js", "demo/config.js", "demo/less/**/*.less"],
@ -336,6 +355,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-contrib-cssmin");
grunt.loadNpmTasks("grunt-contrib-connect");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-copy");
var defaultTask = ["clean", "less", "concat", "connect", "watch"];
grunt.registerTask("default", defaultTask);
@ -344,4 +364,5 @@ module.exports = function (grunt) {
grunt.task.run(defaultTask);
});
grunt.registerTask("build", ["clean", "less", "cssmin", "concat", "uglify"]);
grunt.registerTask("fake-build", ["clean", "less", "cssmin", "concat", "copy"]);
};

4
package.json

@ -10,6 +10,7 @@
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^1.0.1",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-less": "^1.4.1",
@ -21,7 +22,8 @@
"grunt": "grunt",
"start": "node server.js",
"build": "grunt build",
"compile": "grunt compile"
"compile": "grunt compile",
"fake": "grunt fake-build"
},
"repository": {
"type": "git",

Loading…
Cancel
Save