forked from outsideris/angular-summernote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
95 lines (92 loc) · 2.22 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
91
92
93
94
95
/*jshint node:true */
module.exports = function(grunt) {
'use strict';
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
options: {
jshintrc: true
},
gruntfile: {
src: 'Gruntfile.js'
},
src: { src: 'src/**/*.js' },
test: { src: 'test/**/*.test.js' }
},
connect: {
server: {
options: {
port: 9999,
base: ''
}
}
},
watch: {},
karma: {
options: {
configFile: './test/karma.conf.js'
},
'summernote': { },
'summernote-angular-12': {
configFile: './test/karma-angular-1-2-x.conf.js'
},
travis: {
singleRun: true,
browsers: ['PhantomJS'],
reporters: ['progress', 'coverage'],
preprocessors: { '../**/src/**/*.js': 'coverage' },
coverageReporter: { type: 'lcov', dir: '../coverage/' },
plugins: [ 'karma-*' ]
}
},
concat: {
deploy: {
src: ['src/angular-summernote.js'],
dest: 'dist/angular-summernote.js'
}
},
uglify: {
deploy: {
options: {
mangle: false,
banner: '/*\n' +
' angular-summernote v<%=pkg.version%>\n' +
' Copyright 2014 Jeonghoon Byun\n' +
' License: MIT\n' +
' */\n'
},
files: {
'dist/angular-summernote.min.js': ['src/angular-summernote.js']
}
}
},
coveralls: {
options: {
debug: true,
coverageDir: 'coverage',
dryRun: false,
force: true,
recursive: true
}
},
compress: {
main: {
options: {
archive: 'dist/angular-summernote.tar.gz',
mode: 'tgz'
},
files: [
{src: ['dist/*.js'], dest: '', filter: 'isFile'}
]
}
}
});
// Default task.
grunt.registerTask('default', []);
grunt.registerTask('test', ['karma:summernote']);
grunt.registerTask('travis', ['karma:travis', 'coveralls']);
grunt.registerTask('lint', ['jshint']);
grunt.registerTask('deploy', ['concat:deploy', 'uglify:deploy']);
};