-
Notifications
You must be signed in to change notification settings - Fork 53
/
GruntFile.js
65 lines (63 loc) · 2.18 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
debugFilePath: 'jsTag/compiled/<%= pkg.name %>.debug.js',
srcFiles: [
'jsTag/source/javascripts/app.js',
'jsTag/source/javascripts/filters.js',
'jsTag/source/javascripts/models/default/jsTag.js',
'jsTag/source/javascripts/models/default/jsTagsCollection.js',
'jsTag/source/javascripts/services/inputService.js',
'jsTag/source/javascripts/services/tagsInputService.js',
'jsTag/source/javascripts/services.js',
'jsTag/source/javascripts/controllers.js',
'jsTag/source/javascripts/directives.js',
'<%= ngtemplates.jsTag.dest %>'
],
ngtemplates: {
jsTag: {
src: ['jsTag/source/templates/*/**.html'],
dest: 'tmp/templates.js'
}
},
concat: {
versionJS: {
options: {
banner: '/************************************************\n' +
'* jsTag JavaScript Library - Editing tags based on angularJS \n' +
'* Git: https://github.com/eranhirs/jsTag/tree/master\n' +
'* License: MIT (http://www.opensource.org/licenses/mit-license.php)\n' +
'* Compiled At: <%= grunt.template.today("mm/dd/yyyy HH:MM") %>\n' +
'**************************************************/\n' +
'\'use strict\';\n',
footer: '\n\n'
},
src: ['<%= srcFiles %>'],
dest: '<%= debugFilePath%>'
},
versionCSS: {
src: ['jsTag/source/stylesheets/js-tag.css'],
dest: 'jsTag/compiled/<%= pkg.name %>.css'
}
},
uglify: {
versionJS: {
src: ['<%= debugFilePath%>'],
dest: 'jsTag/compiled/<%= pkg.name %>.min.js'
}
},
clean: {
tempFiles: {
src: ['tmp/']
}
}
});
// Load used plugins
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-contrib-clean');
// Build task
grunt.registerTask('version', ['ngtemplates', 'concat:versionCSS', 'concat:versionJS', 'uglify:versionJS', 'clean']);
};