-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
52 lines (42 loc) · 1.26 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
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON 'package.json'
coffee:
pjax:
options:
bare: true
files:
'lib/pjax.js': 'src/pjax.coffee'
demo:
files:
'demo/server.js': 'demo/server.coffee'
'demo/scripts/demo.js': 'demo/scripts/demo.coffee'
umd:
all:
src: 'lib/pjax.js'
template: 'umd.hbs'
amdModuleId: 'simple-pjax'
objectToExport: 'pjax'
globalAlias: 'pjax'
deps:
'default': ['$', 'SimpleModule', 'simpleUrl']
amd: ['jquery', 'simple-module', 'simple-url']
cjs: ['jquery', 'simple-module', 'simple-url']
global:
items: ['jQuery', 'SimpleModule', 'simple.url']
prefix: ''
watch:
scripts:
files: ['src/*.coffee', 'demo/**/*.coffee']
tasks: ['coffee', 'umd']
express:
server:
options:
server: 'demo/server.js'
bases: 'demo'
grunt.loadNpmTasks 'grunt-contrib-sass'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-umd'
grunt.loadNpmTasks 'grunt-express'
grunt.registerTask 'default', ['coffee', 'umd', 'express', 'watch']