Lightly massage some of the generated JavaScript

This commit is contained in:
Arlo Breault 2019-07-06 15:20:07 +02:00
parent 31ad9566e6
commit 1867a3f121
19 changed files with 986 additions and 989 deletions

View file

@ -1,26 +1,44 @@
// Generated by CoffeeScript 2.4.1
var FILES, FILES_SPEC, INITS, OUTFILE, STATIC, compileCoffee, copyStaticFiles, exec, execSync, fs, spawn;
fs = require('fs');
({exec, spawn, execSync} = require('child_process'));
var fs = require('fs');
var { exec, spawn, execSync } = require('child_process');
// All coffeescript files required.
FILES = ['broker.coffee', 'config.coffee', 'proxypair.coffee', 'snowflake.coffee', 'ui.coffee', 'util.coffee', 'websocket.coffee', 'shims.coffee'];
var FILES = [
'broker.coffee',
'config.coffee',
'proxypair.coffee',
'snowflake.coffee',
'ui.coffee',
'util.coffee',
'websocket.coffee',
'shims.coffee'
];
INITS = ['init-badge.coffee', 'init-node.coffee', 'init-webext.coffee'];
var INITS = [
'init-badge.coffee',
'init-node.coffee',
'init-webext.coffee'
];
FILES_SPEC = ['spec/broker.spec.coffee', 'spec/init.spec.coffee', 'spec/proxypair.spec.coffee', 'spec/snowflake.spec.coffee', 'spec/ui.spec.coffee', 'spec/util.spec.coffee', 'spec/websocket.spec.coffee'];
var FILES_SPEC = [
'spec/broker.spec.coffee',
'spec/init.spec.coffee',
'spec/proxypair.spec.coffee',
'spec/snowflake.spec.coffee',
'spec/ui.spec.coffee',
'spec/util.spec.coffee',
'spec/websocket.spec.coffee'
];
OUTFILE = 'snowflake.js';
var OUTFILE = 'snowflake.js';
STATIC = 'static';
var STATIC = 'static';
copyStaticFiles = function() {
var copyStaticFiles = function() {
return exec('cp ' + STATIC + '/* build/');
};
compileCoffee = function(outDir, init) {
var compileCoffee = function(outDir, init) {
var files;
files = FILES.concat('init-' + init + '.coffee');
return exec('cat ' + files.join(' ') + ' | coffee -cs > ' + outDir + '/' + OUTFILE, function(err, stdout, stderr) {