25 lines
533 B
JavaScript
Executable File
25 lines
533 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
var argv = require('optimist').
|
|
usage('Usage: $0 -i [sources] -o [binary]').
|
|
options('i', {
|
|
demand: true,
|
|
alias: 'input',
|
|
desc: 'The entry javascript files'
|
|
}).
|
|
options('o', {
|
|
demand: true,
|
|
alias: 'output',
|
|
desc: 'The output binary'
|
|
}).
|
|
options('r', {
|
|
alias: 'runtime',
|
|
default: '0.6.3',
|
|
description: 'The node.js runtime to use'
|
|
}).argv;
|
|
|
|
|
|
require('../lib').compile({ entries: argv.input.split(' '), output: argv.output, runtime: argv.r }, function(error) {
|
|
|
|
if(error) console.log(error.message);
|
|
}); |