forked from overleaf/filestore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
68 lines (55 loc) · 1.52 KB
/
Gruntfile.coffee
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
module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
coffee:
server:
expand: true,
flatten: false,
cwd: 'app/coffee',
src: ['**/*.coffee'],
dest: 'app/js/',
ext: '.js'
app_server:
expand: true,
flatten: false,
src: ['app.coffee'],
dest: './',
ext: '.js'
server_tests:
expand: true,
flatten: false,
cwd: 'test/unit/coffee',
src: ['*.coffee', '**/*.coffee'],
dest: 'test/unit/js/',
ext: '.js'
watch:
server_coffee:
files: ['app/*.coffee','app/**/*.coffee', 'test/unit/coffee/**/*.coffee', 'test/unit/coffee/*.coffee', "app.coffee"]
tasks: ["clean", 'coffee', 'mochaTest']
clean: ["app/js", "test/unit/js", "app.js"]
nodemon:
dev:
options:
file: 'app.js'
concurrent:
dev:
tasks: ['nodemon', 'watch']
options:
logConcurrentOutput: true
mochaTest:
unit:
src: ["test/unit/js/#{grunt.option('feature') or '**'}/*.js"]
options:
reporter: grunt.option('reporter') or 'spec'
grep: grunt.option("grep")
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-nodemon'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-concurrent'
grunt.loadNpmTasks 'grunt-mocha-test'
grunt.registerTask "test:unit", ["coffee", "mochaTest:unit"]
grunt.registerTask "ci", "test:unit"
grunt.registerTask 'default', ['coffee', 'concurrent']
grunt.registerTask "compile", "coffee"
grunt.registerTask "install", "compile"