scratch – Blame information for rev 92
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
84 | office | 1 | module.exports = function(grunt) { |
2 | grunt.loadNpmTasks('grunt-contrib-concat'); |
||
3 | grunt.loadNpmTasks('grunt-contrib-uglify'); |
||
4 | grunt.loadNpmTasks('grunt-contrib-cssmin'); |
||
5 | |||
6 | grunt.initConfig({ |
||
7 | bwr: grunt.file.readJSON('bower.json'), |
||
8 | meta: { |
||
9 | banner: "/* <%= bwr.name %> v<%= bwr.version %> - https://github.com/Leimi/drawingboard.js\n" + |
||
10 | "* Copyright (c) <%= grunt.template.today('yyyy') %> Emmanuel Pelletier\n" + |
||
11 | '* Licensed MIT */\n' |
||
12 | }, |
||
13 | |||
14 | concat: { |
||
15 | options: { |
||
16 | banner: "<%= meta.banner %>" |
||
17 | }, |
||
18 | light: { |
||
19 | src: [ |
||
20 | 'bower_components/simple-undo/lib/simple-undo.js', |
||
21 | 'js/utils.js', |
||
22 | 'js/board.js' |
||
23 | ], |
||
24 | dest: 'dist/drawingboard.nocontrol.js' |
||
25 | }, |
||
26 | full: { |
||
27 | src: ['bower_components/simple-undo/lib/simple-undo.js', 'js/utils.js', 'js/board.js', 'js/controls/control.js', 'js/controls/color.js', 'js/controls/drawingmode.js', 'js/controls/navigation.js', 'js/controls/size.js', 'js/controls/download.js'], |
||
28 | dest: 'dist/drawingboard.js' |
||
29 | }, |
||
30 | cssLight: { //simple copy in order to have everything in dist/ |
||
31 | src: ['css/drawingboard.nocontrol.css'], |
||
32 | dest: 'dist/drawingboard.nocontrol.css' |
||
33 | }, |
||
34 | cssFull: { //simple copy in order to have everything in dist/ |
||
35 | src: ['css/drawingboard.css'], |
||
36 | dest: 'dist/drawingboard.css' |
||
37 | } |
||
38 | }, |
||
39 | |||
40 | uglify: { |
||
41 | options: { |
||
42 | banner: "<%= meta.banner %>", |
||
43 | report: "gzip" |
||
44 | }, |
||
45 | light: { |
||
46 | files: { |
||
47 | 'dist/drawingboard.nocontrol.min.js': ['dist/drawingboard.nocontrol.js'] |
||
48 | } |
||
49 | }, |
||
50 | full: { |
||
51 | files: { |
||
52 | 'dist/drawingboard.min.js': ['dist/drawingboard.js'] |
||
53 | } |
||
54 | } |
||
55 | }, |
||
56 | |||
57 | cssmin: { |
||
58 | options: { |
||
59 | banner: "<%= meta.banner %>" |
||
60 | }, |
||
61 | light: { |
||
62 | files: { |
||
63 | 'dist/drawingboard.nocontrol.min.css': ['css/drawingboard.nocontrol.css'] |
||
64 | } |
||
65 | }, |
||
66 | full: { |
||
67 | files: { |
||
68 | 'dist/drawingboard.min.css': ['css/drawingboard.css'] |
||
69 | } |
||
70 | } |
||
71 | } |
||
72 | }); |
||
73 | |||
74 | grunt.registerTask('default', ['concat', 'uglify', 'cssmin']); |
||
75 | }; |