forked from bbuchsbaum/psycloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.coffee
106 lines (88 loc) · 3.1 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
coffee = require 'coffee-script'
module.exports = (grunt) ->
grunt.initConfig
clean:
all: ['build', 'lib']
coffee:
options:
sourceMap: false
all:
src: '**/*.coffee'
dest: 'lib'
cwd: 'src'
flatten: false
expand: true
ext: '.js'
powerbuild:
options:
sourceMap: false
node: false
verbose: false
entryPoints: 'lib/main.js'
export: "Psy"
output: 'build/psycloud.js'
#handlers:
# '.coffee': (src, canonicalName) ->
# console.log("compiling", canonicalName)
# {js, v3SourceMap} = coffee.compile src, sourceMap: true, bare: true
# return {code: js, map: v3SourceMap}
all:
files: [
{src: "lib/main.js", dest: 'build/psycloud.js'}
]
min:
options:
minify: true
compress: true
files: [
{src: "lib/main.js", dest: 'build/psycloud.min.js'}
]
watch:
scripts:
files: ['src/**/*.coffee']
tasks: ['code']
options:
spawn: true
concat_sourcemap:
options:
sourceRoot: ".."
all:
files:
"build/psycloud_bundle.js": ['build/psycloud.js', 'jslibs/jqxcore.js', 'jslibs/jqxbuttons.js', 'jslibs/jqxslider.js', 'jslibs/jquery-1.7.js', 'vex.combined.min.js']
concat:
min:
#src: ['build/psycloud.min.js', 'jslibs/jquery-1.7.min.js', 'jslibs/jqxcore.js', 'jslibs/jqxbuttons.js', 'jslibs/jqxslider.js', 'vex.combined.min.js']
src: ['jslibs/buzz.js', 'jslibs/kinetic-v5.0.1.js', 'jslibs/jquery-1.7.min.js', 'jslibs/jqxcore.js', 'jslibs/jqxbuttons.js', 'jslibs/jqxslider.js', 'vex.combined.min.js', 'jslibs/semantic.js']
dest: 'build/psycloud_libs.min.js'
all:
src: ['jslibs/buzz.js', 'jslibs/kinetic-v5.0.1.js', 'jslibs/jquery-1.7.js', 'jslibs/jqxcore.js', 'jslibs/jqxbuttons.js', 'jslibs/jqxslider.js', 'vex.combined.min.js', 'jslibs/semantic.js']
dest: 'build/psycloud_libs.js'
cssmin:
combine:
files:
'build/psycloud_bundle.css': ['css/*.css']
copy:
main:
files: [
expand: true
flatten: true
src: 'css/images/*'
dest: 'build/images'
]
shell:
codo:
command: 'codo src'
grunt.loadNpmTasks('grunt-shell')
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-concat-sourcemap');
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-cssmin')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('powerbuild')
grunt.registerTask('code', ['clean', 'powerbuild:all', 'concat', 'copy'])
#grunt.registerTask('default', ['clean', 'coffee', 'powerbuild:all', 'concat_sourcemap:all', 'cssmin', 'shell'])
grunt.registerTask('default', ['clean', 'coffee', 'powerbuild:all', 'concat', 'cssmin', 'copy', 'shell'])
grunt.registerTask('document', ['shell'])
grunt.registerTask('power', ["powerbuild"])