-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbuild.js
36 lines (30 loc) · 921 Bytes
/
build.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
/*
* _postinstall.js is a script that runs automatically after the `npm install`
* command to run bower install as follow up task.
*
* @author: Anselm Hannemann
* @date: 2014-02-24
*
*/
/* globals console, process */
// Get platform from node
var os = require('os');
var platform = os.platform();
if (platform === 'darwin' || platform === 'linux' || platform === 'win32') {
// Call child process and execute
var exec = require('child_process').exec;
exec('browserify ./lib/http2-cache.js -o ./index.js', function (error, stdout, stderr) {
console.log('Browserify dependencies');
if (stdout) {
console.log(stdout);
}
if (error !== null) {
console.log(error);
} else {
console.log('Browserify was successful.');
}
});
return;
}
console.error('Unknown environment. Please log an issue at https://github.com/use-init/init/issues:', platform);
process.exit(1);