-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathbuild.js
More file actions
executable file
·34 lines (27 loc) · 779 Bytes
/
build.js
File metadata and controls
executable file
·34 lines (27 loc) · 779 Bytes
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
#!/usr/bin/env node
/*
* Use the Closure Compiler Service API to minify create-profile.js and write to
* create-profile.min.js for use by call-trace.
*/
/* jshint node:true, esnext: true */
'use strict';
var fs = require('fs');
var ClosureCompiler = require('google-closure-compiler').compiler;
var closureCompiler = new ClosureCompiler({
js: 'create-profile.js',
externs: 'create-profile-externs.js',
compilation_level: 'ADVANCED',
warning_level: 'VERBOSE',
language_out: 'ECMASCRIPT5_STRICT',
env: 'CUSTOM',
js_output_file: 'create-profile.min.js'
});
var compilerProcess = closureCompiler.run(function(exitCode, stdOut, stdErr) {
if (stdOut) {
console.log(stdOut);
}
if (stdErr) {
console.error(stdErr);
}
process.exit(exitCode);
});