forked from electron-userland/electron-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
executable file
·34 lines (26 loc) · 719 Bytes
/
cli.js
File metadata and controls
executable file
·34 lines (26 loc) · 719 Bytes
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
#! /usr/bin/env node
/*
* electron-builder
* https://github.com/loopline-systems/electron-builder
*
* Licensed under the MIT license.
*/
'use strict';
var fs = require( 'fs' );
var meow = require( 'meow' );
var assign = require( 'lodash.assign' );
var path = require( 'path' );
var builder = ( require( './' ) ).init();
var usage = fs.readFileSync( path.join( __dirname, 'usage.txt' ) ).toString();
var cli = meow( {
help : usage
} );
var appPath = path.join( process.cwd(), cli.input[ 0 ] );
builder.build( assign( {
appPath : appPath
}, cli.flags ), function( error ) {
if ( error ) {
throw error;
}
console.log( '- Created installer for ' + cli.flags.platform + ' -' );
} );