mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-27 02:52:14 +01:00
7263101be0
Fix build under Windows Remove htmls from pug directory Move package.json to web directory Remove OS type checking from test Fix builder.js codestyle Remove Taskfile_windows.yml
27 lines
465 B
JavaScript
27 lines
465 B
JavaScript
var fs = require('fs'),
|
|
bundle = require('./bundle.json'),
|
|
out = fs.createWriteStream('./public/js/bundle.js');
|
|
|
|
bundle.forEach(function(file) {
|
|
var o = {};
|
|
if (typeof file === 'object') {
|
|
o = file;
|
|
file = o.src;
|
|
}
|
|
|
|
file = file + '.js';
|
|
|
|
var contents = fs.readFileSync(file);
|
|
|
|
out.write('\n/* BUNDLED FILE: ' + file + ' */\n');
|
|
|
|
if (o.pre) {
|
|
out.write(o.pre + '\n');
|
|
}
|
|
|
|
out.write(contents + '\n');
|
|
|
|
if (o.post) {
|
|
out.write(o.post + '\n');
|
|
}
|
|
}); |