-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
132 lines (115 loc) · 4.08 KB
/
Gruntfile.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
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
130
131
132
/* eslint-env node */
"use strict";
module.exports = function (grunt) {
var files = {
jQuery: [
"node_modules/infusion/src/lib/jquery/core/js/jquery.js"
],
infusion: [
"node_modules/infusion/src/framework/core/js/Fluid.js",
"node_modules/infusion/src/framework/core/js/FluidDebugging.js",
"node_modules/infusion/src/framework/core/js/FluidIoC.js",
"node_modules/infusion/src/framework/core/js/DataBinding.js",
"node_modules/infusion/src/framework/core/js/FluidDOM.js",
"node_modules/infusion/src/framework/core/js/ModelTransformation.js",
"node_modules/infusion/src/framework/core/js/ModelTransformationTransforms.js",
"node_modules/infusion/src/framework/core/js/FluidDocument.js",
"node_modules/infusion/src/framework/core/js/FluidDOMUtilities.js",
"node_modules/infusion/src/framework/core/js/FluidView.js",
"node_modules/infusion/src/framework/enhancement/js/ContextAwareness.js"
],
bergson: [
"node_modules/bergson/src/js/clock.js",
"node_modules/bergson/src/js/clock-logger.js",
"node_modules/bergson/src/js/raf-clock.js",
"node_modules/bergson/src/js/priority-queue.js",
"node_modules/bergson/src/js/scheduler.js"
],
flocking: [
"node_modules/flocking/dist/flocking-base.js",
"node_modules/flocking/src/ugens/oscillators.js",
"node_modules/flocking/src/ugens/envelopes.js"
],
aconite: [
"src/core.js",
"src/readiness-notification.js",
"src/timecode.js",
"src/glComponent.js",
"src/animation-clock.js",
"src/animation.js",
"src/compositor.js",
"src/video.js",
"src/video-timeline-notifier.js",
"src/video-player.js",
"src/video-performer.js",
"src/compositables.js",
"src/video-compositors.js",
"src/clip-sequencers.js",
"src/fcpxml-parser.js",
"src/pip.js",
"src/ui/js/playButton.js"
]
};
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
eslint: {
all: ["src/**/*.js", "tests/**/*.js"],
},
concat: {
options: {
separator: ";",
banner: "<%= aconite.banners.short %>"
},
all: {
src: [].concat(
files.jQuery,
files.infusion,
files.bergson,
files.flocking,
files.aconite
),
dest: "dist/<%= pkg.name %>-all.js"
},
only: {
src: [].concat(files.aconite),
dest: "dist/<%= pkg.name %>-only.js"
}
},
uglify: {
options: {
banner: "<%= aconite.banners.short %>",
beautify: {
ascii_only: true
}
},
all: {
files: [
{
expand: true,
cwd: "dist/",
src: ["*.js"],
dest: "dist/",
ext: ".min.js",
}
]
}
},
clean: {
all: {
src: ["dist/"]
}
},
aconite: {
banners: {
short: "/*! Aconite <%= pkg.version %>, Copyright <%= grunt.template.today('yyyy') %> Colin Clark | github.com/colinbdclark/aconite */\n\n"
}
}
});
// Load relevant Grunt plugins.
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("fluid-grunt-eslint");
grunt.registerTask("default", ["clean", "eslint", "concat", "uglify"]);
};