-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
45 lines (36 loc) · 964 Bytes
/
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
webpack = require('webpack')
webpackConfig = require('./webpack.config.js')
config =
webpack:
prod: require('./grunt_webpack.config.js')("min")
"webpack-dev-server":
server:
options:
contentBase: 'public/'
hot: true
keepalive: true
port: 3001
publicPath: webpackConfig.output.publicPath
webpack: webpackConfig
clean:
public: ['public/js']
coffee:
server:
expand: true,
cwd: 'server/src',
src: ['**/*.coffee'],
dest: 'server/gen/',
ext: '.js'
watch:
options:
livereload: false
server:
files: ['server/**/*.coffee'],
tasks: ['coffee']
module.exports = (grunt) ->
require('load-grunt-tasks')(grunt)
grunt.initConfig(config)
grunt.registerTask('default', ['server'])
grunt.registerTask('server', ['coffee', 'clean'])
grunt.registerTask('build', ['server', 'webpack:prod'])
grunt.registerTask('test', ['watch'])