-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgruntfile.js
54 lines (50 loc) · 1.05 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
'use strict';
module.exports = function(grunt) {
require('jit-grunt')(grunt);
// Project Configuration
grunt.initConfig({
ngAnnotate: {
production: {
files: {
'dist/form.js': [
'config/**/*.js', 'controllers/**/*.js',
'directives/**/*.js', 'services/**/*.js',
'dist/template.js'
]
}
}
},
html2js: {
options: {
base: '',
module: 'angular-tellform.templates',
singleModule: true,
rename: function (moduleName) {
return 'modules/forms/base/' + moduleName;
}
},
form: {
src: ['views/**/*.html'],
dest: 'dist/template.js'
}
},
cssmin: {
combine: {
files: {
'dist/form.css': 'css/**/*.css'
}
}
},
browserify: {
dist: {
files: {
'dist/bundle.js': ['index.js', 'dist/template.js']
}
}
}
});
// Making grunt default to force in order not to break the project.
grunt.option('force', true);
// Default task(s).
grunt.registerTask('default', ['html2js:form', 'ngAnnotate', 'cssmin', 'browserify:dist']);
};