mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-12 14:31:28 +00:00
Improve bundled asc example a bit, see #25
This commit is contained in:
@ -44,6 +44,7 @@ function main(argv, options, callback) {
|
||||
const readFile = options.readFile || readFileNode;
|
||||
const writeFile = options.writeFile || writeFileNode;
|
||||
const listFiles = options.listFiles || listFilesNode;
|
||||
const stats = options.stats || createStats();
|
||||
|
||||
// All of the above must be specified in browser environments
|
||||
if (!stdout) throw Error("'options.stdout' must be specified");
|
||||
@ -54,9 +55,6 @@ function main(argv, options, callback) {
|
||||
if (listFiles === listFilesNode) throw Error("'options.listFiles' must be specified");
|
||||
}
|
||||
|
||||
// Record compilation times
|
||||
const stats = createStats();
|
||||
|
||||
const args = parseArguments(argv);
|
||||
const indent = 24;
|
||||
|
||||
@ -507,6 +505,8 @@ function createStats() {
|
||||
};
|
||||
}
|
||||
|
||||
exports.createStats = createStats;
|
||||
|
||||
if (!process.hrtime)
|
||||
process.hrtime = require("browser-process-hrtime");
|
||||
|
||||
|
Reference in New Issue
Block a user