-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
27 lines (22 loc) · 849 Bytes
/
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
var path = require('path');
var builder = require('./task');
module.exports = function(grunt) {
var serverTask = require('./grunts/server')(builder);
var viewTask = require('./grunts/view')(builder);
builder
.addVar('rootPath', path.resolve('.'))
.addVar('publicPath', '<%= rootPath %>/public')
.addVar('compilePath', '<%= publicPath %>/compile')
.addModule('grunt-contrib-watch')
.addConfig('watch', 'view', {
files: ['<%= publicPath %>/**/*.styl'],
tasks: [viewTask]
})
.addConfig('watch', 'server', {
files: ['<%= rootPath %>/server/**/*.js'],
tasks: [serverTask]
})
.createTask('default', [serverTask, viewTask, 'watch:view', 'watch:server'])
.createTask('build', [viewTask])
.init(grunt);
}