This repository was archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathGruntfile.js
More file actions
49 lines (47 loc) · 1.28 KB
/
Gruntfile.js
File metadata and controls
49 lines (47 loc) · 1.28 KB
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
module.exports = function(grunt) {
//Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
mangle: {
properties: true
},
banner: '/*!\n * <%= pkg.name %> v<%= pkg.version %>, <%= grunt.template.today("dd.mm.yyyy") %>\n * <%= pkg.description %>\n * By <%= pkg.author %> (<%= pkg.homepage %>, @ankitpokhrel)\n * Licenced under <%= pkg.license %>\n */\n'
},
build: {
files: {
'dist/alert.min.js': ['lib/<%= pkg.name %>']
}
}
},
jshint: {
build: ['Gruntfile.js', 'lib/<%= pkg.name %>', 'tests/AlertSpec.js']
},
cssmin: {
build: {
files: {
'dist/alert.core.min.css': ['theme/alert.core.css'],
'dist/alert.default.min.css': ['theme/alert.default.css'],
'dist/alert.lite.min.css': ['theme/alert.lite.css']
}
}
},
copy: {
main: {
expand: true,
flatten: true,
src: ['lib/*.js', 'theme/*.css'],
dest: 'dist/src/',
filter: 'isFile'
}
}
});
//Load required plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
//Register tasks
grunt.registerTask('default', ['jshint', 'uglify', 'cssmin', 'copy']);
};