forked from angularify/angular-semantic-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
63 lines (59 loc) · 1.93 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
'use strict';
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-html2js');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-conventional-changelog');
grunt.loadNpmTasks('grunt-ngdocs');
grunt.initConfig({
dist: 'dist',
filename: 'angular-semantic-ui',
pkg: grunt.file.readJSON('package.json'),
concat: {
js: {
src: ['src/angularify.semantic.js',
'src/accordion/accordion.js',
'src/checkbox/checkbox.js',
'src/dimmer/dimmer.js',
'src/dropdown/dropdown.js',
'src/modal/modal.js',
'src/popup/popup.js',
'src/sidebar/sidebar.js',
'src/rating/rating.js',
'src/wizard/wizard.js',
],
dest: '<%= dist %>/<%= filename %>.js'
}
},
uglify: {
dist: {
src: ['<%= dist %>/<%= filename %>.js'],
dest: '<%= dist %>/<%= filename %>.min.js'
}
},
karma: {
options: {
configFile: 'karma.conf.js'
},
watch: {
background: true
},
continuous: {
singleRun: true
},
},
watch: {
javascript: {
files: ['src/**/*.js'],
tasks: ['concat:js', 'uglify']
}
}
});
grunt.registerTask('build', ['concat:js', 'uglify']);
grunt.registerTask('test', ['karma']);
grunt.registerTask('default', ['concat:js', 'uglify', 'watch:javascript']);
};