-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGruntfile.js
110 lines (104 loc) · 2.71 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: ["./dist"],
uglify: {
options : {
//beautify : true -> Need to figure out this stuff
},
all: {
files: {
'dist/cts.min.js': ['dist/cts.js']
}
},
i18n: {
files : {
'dist/i18n/en.min.js' : ["src/i18n/en.js"]
}
}
},
concat: {
all: {
files : {
'dist/cts.js' : [
'src/cts.js',
'src/modules/utils.js',
'src/modules/service.js',
'src/modules/xslt.js',
'src/modules/endpoint.js',
'src/modules/text.js',
'src/modules/repository.js',
'src/modules/i18n.js',
'src/services/*.js',
'src/endpoints/*.js',
'src/xslt/*.js',
'src/i18n/en.js'
]
}
}
},
jslint: {
all: ['src/*.js', 'src/**/*.js']
},
jasmine : {
src : [
'src/cts.js',
'src/modules/**.js',
'src/i18n/**.js',
'src/services/**.js',
'src/endpoints/**.js',
'src/xslt/**.js',
],
options : {
vendor: [
'node_modules/jasmine-ajax/lib/mock-ajax.js',
'node_modules/jasmine-expect/dist/jasmine-matchers.js',
'node_modules/jquery/dist/jquery.min.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'spec/javascripts/.helper.js'
],
specs : 'spec/**/*.specs.js',
keepRunner : true
}
},
jsdoc : {
dist : {
src: [
'src/cts.js',
'src/modules/*.js'
],
options: {
destination: 'doc_html',
configure : "jsdoc.conf.json",
template: './node_modules/grunt-jsdoc/node_modules/ink-docstrap/template'
}
}
},
'gh-pages': {
options: {
base: 'doc_html'
},
src: '**/*'
},
release : {
options: {
additionalFiles: ['bower.json']
}
}
});
// Register tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks("grunt-jsdoc");
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-release');
// Default task.
grunt.registerTask('default', ['concat', 'uglify']);
grunt.registerTask('build', ['default']);
grunt.registerTask('test', ['jasmine']);
grunt.registerTask('page', ['jsdoc', 'gh-pages'])
grunt.registerTask('version', ['build', 'page', 'release']);
};