forked from websanova/wPaint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
90 lines (88 loc) · 2.65 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
options: {
bitwise: true,
camelcase: true,
indent: 2,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true,
white: true,
validthis: true,
quotmark: 'single',
globals: {
'window': true,
'jQuery': true,
'document': true,
'Image': true,
'setTimeout': true,
'clearTimeout': true,
'event': true,
'CanvasRenderingContext2D': true
}
},
files: {
src: ['./plugins/**/src/wPaint-*.js', './src/*.js']
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */'
},
my_target: {
files: {
'./wPaint.min.js': ['./src/wPaint.js', './src/wPaint.utils.js'],
'./plugins/main/wPaint.menu.main.min.js': ['./plugins/main/src/wPaint.menu.main.js', './plugins/main/src/fillArea.min.js'],
'./plugins/text/wPaint.menu.text.min.js': ['./plugins/text/src/wPaint.menu.text.js'],
'./plugins/shapes/wPaint.menu.main.shapes.min.js': ['./plugins/shapes/src/wPaint.menu.main.shapes.js', './plugins/shapes/src/shapes.min.js'],
'./plugins/file/wPaint.menu.main.file.min.js': ['./plugins/file/src/wPaint.menu.main.file.js']
}
}
},
stylus: {
compile: {
options: {
import: ['nib', '../lib/mixins'],
},
files: {
'./wPaint.min.css': './src/wPaint.css'
}
}
},
concat: {
basic_and_extras: {
files: {
'wPaint-min.js': ['./lib/wColorPicker.min.js', './wPaint.min.js'],
'wPaint-min.css': ['./lib/wColorPicker.min.css', './wPaint.min.css'],
},
}
},
watch: {
files: [
'./src/wPaint.css',
'./src/wPaint.js',
'./plugins/file/src/wPaint.menu.main.js',
'./plugins/file/src/wPaint.menu.text.js',
'./plugins/file/src/wPaint.menu.main.shapes.js',
'./plugins/file/src/wPaint.menu.main.file.js'
],
tasks: ['uglify']
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['jshint', 'stylus', 'uglify']);
};