-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
73 lines (65 loc) · 1.73 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
68
69
70
71
72
73
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
jade:
development:
files: [
expand: true
cwd: "src/jade/examples"
src: "**/*.jade"
dest: "www/examples"
ext: ".html"
]
stylus:
options:
paths: ['src/stylus']
development:
files: 'www/engine.css': 'src/stylus/engine.styl'
browserify:
options:
browserifyOptions:
extensions: ['.coffee', '.jade']
paths: ['./node_modules','./src']
development:
files: [
{ 'www/engine.js': ['src/coffee/engine.coffee'] }
{
expand: true
cwd: "src/coffee/examples"
src: "**/*.coffee"
dest: "www/examples/js"
ext: ".js"
}
]
watch:
options:
livereload: true
jade:
files: [ 'src/**/*.jade' ]
tasks: [ 'jade', 'browserify' ]
stylus:
files: [ 'src/**/*.styl' ]
tasks: [ 'stylus' ]
browserify:
files: [
'src/**/*.coffee'
'src/**/*.js'
]
tasks: [ 'browserify' ]
connect:
server:
options:
livereload: true
port: 8000
base: 'www'
open:
development:
path: 'http://localhost:8000/examples'
grunt.loadNpmTasks 'grunt-browserify'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-stylus'
grunt.loadNpmTasks 'grunt-contrib-jade'
grunt.loadNpmTasks 'grunt-contrib-connect'
grunt.loadNpmTasks 'grunt-open'
grunt.registerTask 'compile', ['jade', 'stylus', 'browserify']
grunt.registerTask 'start', ['compile', 'connect', 'open', 'watch']