Gruntfile.js
4.06 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
module.exports = function (grunt) {
"use strict";
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
dist: {
files:[
{src: 'src/arcs_browser.js', dest: 'build/arcs_browser.js'}
]
}
},
jsdoc: {
dist: {
src: ['src/*.js', 'docs/Readme.md'], //, 'components/*.js'],
options: {
/*verbose: true,
access: 'all',
private: true,*/
destination: 'docs/engine',
template: 'docs/arcs',
configure: 'docs/jsdoc.conf.json'
}
},
components : {
src: ['components/*.js', 'deps/surf/surf.js', 'deps/pose/posit_gen.js'],
options: {
verbose: true,
destination: 'docs/components',
template: 'docs/arcs',
configure: 'docs/jsdoc.conf.json'
}
}
},
jslint: {
dist: {
src: ['*.js'],
exclude: ['require.js', 'text.js'],
directives: {
node: true,
sloppy: true,
plusplus: true,
forin: true,
devel: true,
white: true,
predef: ['define', 'arcs_module', 'document']
//browser: true,
}
}
},
terser: {
build: {
files: {
'build/arcs.min.js': [
'build/arcs.js'
],
'build/arcs_browser.min.js': [
'src/arcs_browser.js'
],
'build/arcseditor.min.js': [
'build/arcseditor.js'
]
}
}
},
bower: {
options : {
verbose: true,
targetDir: './deps',
copy: true,
cleanBowerDir: true,
layout: 'byComponent'
},
install : {
}
},
concat: {
dist: {
src: [
'src/arcs.js',
'src/component.js',
'src/context.js',
'src/invocation.js',
'src/connection.js',
'src/sheet.js',
'src/eventlogicparser.js',
'src/tokenevent.js',
'src/transitionnetwork.js',
'src/statemachine.js',
'src/application.js',
'src/exports.js'
],
dest: 'build/arcs.js'
},
editor : {
src: [
'utils/editor/arcseditor.js',
'utils/editor/dragdrop.js',
'utils/editor/template.js',
'utils/editor/dialog.js',
'utils/editor/componentdialog.js',
'utils/editor/invocationdialog.js',
'utils/editor/connectiondialog.js'
],
dest: 'build/arcseditor.js'
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-jslint');
grunt.loadNpmTasks('grunt-terser');
grunt.loadNpmTasks('grunt-bower-task');
// Default task(s).
grunt.registerTask('default', ['concat','copy','terser']);
grunt.registerTask('lint', ['jslint']);
grunt.registerTask('doc', ['jsdoc']);
};