add demo
[LunarCalendar.git] / Gruntfile.js
... / ...
CommitLineData
1module.exports = function(grunt) {
2 //Project configuration.
3 grunt.initConfig({
4 pkg: grunt.file.readJSON('package.json'),
5 uglify: {
6 options: {
7 banner: '/**\n * 农历(阴历)万年历\n * LunarCalendar;NPM NAME:<%= pkg.name %>\n * vervison : v<%= pkg.version %>\n * Github : https://github.com/zzyss86/LunarCalendar\n * HomePage : http://www.tuijs.com/\n * Author : JasonZhou\n * Email : zzyss86@qq.com\n */\n'
8 },
9 build: {
10 src: 'lib/LunarCalendar.js',
11 dest: 'lib/LunarCalendar.min.js'
12 },
13 buildhl: {
14 expand: true,
15 cwd: 'hl/',
16 src: '**/*.js',
17 dest: 'hl_build/',
18 ext: '.min.js'
19 },
20 buildDemo: {
21 src: 'demo/calendar/js/calendar.js',
22 dest: 'demo/calendar/js/calendar.min.js'
23 }
24 },
25 cssmin: {
26 options: {
27 keepSpecialComments: 0
28 },
29 compress: {
30 files:{
31 'demo/calendar/style.min.css' : ['demo/calendar/style.css']
32 }
33 }
34 }
35 });
36
37 // 加载包含 "uglify" 任务的插件。
38 grunt.loadNpmTasks('grunt-contrib-uglify');
39 grunt.loadNpmTasks('grunt-contrib-cssmin');
40
41 // 默认被执行的任务列表。
42 grunt.registerTask('default', ['uglify']);
43 grunt.registerTask('hl', ['uglify:buildhl']);
44 grunt.registerTask('demo', ['cssmin']);
45};