forked from AppGyver/steroids-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrunt.js
93 lines (86 loc) · 2.58 KB
/
grunt.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
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
module.exports = function(grunt) {
// Project configuration.
var documentationSourceFiles = [
// 'docs/Steroids.html',
'docs/App.html',
'docs/Animation.html',
'docs/Audio.html',
'docs/Button.html',
'docs/Camera.html',
'docs/Device.html',
'docs/Flash.html',
'docs/NavigationBar.html',
'docs/LayerCollection.html',
'docs/Layer.html',
'docs/Tab.html'
// 'docs/NativeObject.html',
// 'docs//Bridge.html',
// 'docs//WebsocketBridge.html'
]
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */'
},
coffee: {
app: {
src: ['src/**/*.coffee'],
dest: 'lib/',
options: {
bare: true,
preserve_dirs: true,
base_path: "src"
}
}
},
watch: {
files: ['src/**/*'],
tasks: 'default'
},
concat: {
dist: {
src: [
'<banner>',
'<file_strip_banner:lib/bridges/Bridge.js>',
'<file_strip_banner:lib/bridges/WebsocketBridge.js>',
'<file_strip_banner:lib/NativeObject.js>',
'<file_strip_banner:lib/models/Device.js>',
'<file_strip_banner:lib/models/Animation.js>',
'<file_strip_banner:lib/models/App.js>',
'<file_strip_banner:lib/models/Button.js>',
'<file_strip_banner:lib/models/Modal.js>',
'<file_strip_banner:lib/models/LayerCollection.js>',
'<file_strip_banner:lib/models/Layer.js>',
'<file_strip_banner:lib/models/Tab.js>',
'<file_strip_banner:lib/models/NavigationBar.js>',
'<file_strip_banner:lib/models/Audio.js>',
'<file_strip_banner:lib/models/Flash.js>',
'<file_strip_banner:lib/models/Camera.js>',
'<file_strip_banner:lib/Steroids.js>'
],
dest: 'dist/steroids.js',
separator: ';'
},
docs_by_version: {
src: documentationSourceFiles,
dest: 'docs/<%= pkg.name %>-<%= pkg.version %>.html',
separator: '<hr>'
},
docs_latest_version: {
src: documentationSourceFiles,
dest: 'docs/<%= pkg.name %>-latest.html',
separator: '<hr>'
}
},
shell: {
generate_documentation: {
command: 'npm run-script gdocs'
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-coffee');
// Default task.
grunt.registerTask('default', 'coffee concat:dist shell:generate_documentation concat:docs_by_version concat:docs_latest_version');
};