-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathGruntfile.coffee
More file actions
117 lines (106 loc) · 3.36 KB
/
Gruntfile.coffee
File metadata and controls
117 lines (106 loc) · 3.36 KB
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
111
112
113
114
115
116
117
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
clean: ['bower_components','js', 'dist', 'lib','example/css','example/font', 'example/js']
bower:
install:
options:
install: true
targetDir: 'lib'
coffee:
compile:
files:
'js/src.js': ['src/**/*.coffee']
options:
bare: true
sourceMap: false
concat:
js:
src: [
'bower_components/bootstrap3-datetimepicker/build/js/bootstrap-datetimepicker.min.js',
'js/src.js']
dest: 'dist/ng-bs3-datepicker.js'
css:
src: [
'bower_components/bootstrap3-datetimepicker/build/css/bootstrap-datetimepicker.min.css'
]
dest: 'dist/ng-bs3-datepicker.css'
uglify:
options:
mangle: false
main:
files:
'dist/ng-bs3-datepicker.min.js': ['dist/ng-bs3-datepicker.js']
watch:
options:
livereload: true
spawn: false
debounceDelay: 50
atBegin: true
coffee:
files: 'src/**/*.coffee'
tasks: ['coffee:compile', 'concat', 'uglify:main']
karma:
'watch-unit':
configFile: 'build/karma.conf.js'
autoWatch: true
'watch-e2e':
configFile: 'build/karma-e2e.conf.js'
autoWatch: true
unit:
configFile: 'build/karma.conf.js'
singleRun: true
browsers: ['PhantomJS']
e2e:
configFile: 'build/karma-e2e.conf.js'
singleRun: true
browsers: ['PhantomJS']
everything:
configFile: 'build/karma-e2e.conf.js'
singleRun: true
browsers: ['PhantomJS', 'Firefox', 'Chrome']
# copy files to exemple directory
copy:
js:
files: [ flatten:true, expand:true, src: [
'dist/ng-bs3-datepicker.js',
'lib/bootstrap/*.js',
'lib/angular/angular.js',
'lib/jquery/jquery.js',
'lib/moment/moment.js',
'bower_components/moment/locale/fr-ca.js'
], dest: 'example/js' ]
css:
files: [ flatten:true, expand:true, src: [
'dist/ng-bs3-datepicker.css',
'lib/font-awesome/css/*.css'
'lib/bootstrap/*.css'
], dest: 'example/css' ]
font:
files: [ flatten:true, expand:true, src: [ 'lib/font-awesome/fonts/*' ], dest: 'example/fonts/' ]
'http-server':
dev:
# the server root directory
root: "./"
port: 8111,
host: "localhost"
# cache: "<sec>"
showDir : true,
autoIndex: true,
defaultExt: "html",
#wait or not for the process to finish
# runInBackground: false
runInBackground: true
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-uglify'
grunt.loadNpmTasks 'grunt-bower-task'
grunt.loadNpmTasks 'grunt-karma'
grunt.loadNpmTasks 'grunt-contrib-copy'
grunt.loadNpmTasks 'grunt-http-server'
grunt.registerTask 'test-unit', ['karma:unit']
grunt.registerTask 'test-system', ['http-server','karma:e2e']
grunt.registerTask 'build', ['coffee', 'concat', 'uglify', 'copy:*']
grunt.registerTask 'default', [ 'clean', 'bower','build','test-unit','test-system' ]