Skip to content

Commit 7a06b66

Browse files
committed
copy css and images to dist file and other build fixes
1 parent 7d342b4 commit 7a06b66

File tree

2 files changed

+48
-16
lines changed

2 files changed

+48
-16
lines changed

Gruntfile.js

+46-16
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,55 @@ module.exports = function(grunt) {
99
copy: {
1010
dist: {
1111
files: [{
12-
expand: true,
13-
flatten: true,
14-
cwd: '',
15-
dest: 'dist',
16-
src: [
17-
'bower_components/jquery/jquery.min.js',
18-
'bower_components/jquery-ui/jquery-ui.min.js'
19-
]
20-
}]
12+
expand: true,
13+
flatten: true,
14+
cwd: '',
15+
dest: 'dist/js',
16+
src: [
17+
'bower_components/jquery/jquery.min.js',
18+
'bower_components/jquery-ui/jquery-ui.min.js'
19+
]
20+
}, {
21+
expand: true,
22+
flatten: true,
23+
cwd: '',
24+
dest: 'dist/images',
25+
src: [
26+
'images/accept.png',
27+
'images/asterisk_yellow.png',
28+
'images/cross.png',
29+
'images/delete.png'
30+
]
31+
}
32+
]
2133
}
2234
},
2335

2436
uglify: {
37+
options: {
38+
mangle: {
39+
except: ['jQuery', '$']
40+
}
41+
},
42+
dist: {
43+
files: {
44+
'dist/js/jquery.annotate.min.js': ['js/jquery.annotate.js']
45+
}
46+
}
47+
},
48+
49+
concat: {
50+
options: {},
51+
dist: {
52+
src: ['dist/js/jquery.min.js', 'dist/js/jquery-ui.min.js', 'dist/js/jquery.annotate.min.js'],
53+
dest: 'dist/js/jquery.annotate.concat.min.js',
54+
},
55+
},
56+
57+
cssmin: {
2558
dist: {
2659
files: {
27-
'dist/jquery.annotate.min.js': ['js/jquery.annotate.js'],
28-
'dist/jquery.annotate.concat.min.js': [
29-
'dist/jquery.min.js',
30-
'dist/query-ui.min.js',
31-
'js/jquery.annotate.js'
32-
]
60+
'dist/css/annotate.min.css': ['css/annotation.css']
3361
}
3462
}
3563
}
@@ -38,7 +66,9 @@ module.exports = function(grunt) {
3866

3967
grunt.registerTask('default', [
4068
'copy',
41-
'uglify'
69+
'uglify',
70+
'concat',
71+
'cssmin'
4272
]);
4373

4474
};

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"version": "0.0.0",
44
"devDependencies": {
55
"grunt": "^0.4.5",
6+
"grunt-contrib-concat": "^0.5.0",
67
"grunt-contrib-copy": "^0.7.0",
8+
"grunt-contrib-cssmin": "^0.10.0",
79
"grunt-contrib-uglify": "^0.6.0",
810
"load-grunt-tasks": "^0.6.0"
911
}

0 commit comments

Comments
 (0)