forked from adobe-extension-tools/cep-bundler-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbin.js
executable file
·42 lines (39 loc) · 954 Bytes
/
bin.js
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
35
36
37
38
39
40
41
42
#!/usr/bin/env node
var path = require('path')
var argv = require('yargs')
.option('in', {
alias: 'i',
describe: 'Input folder',
default: '.'
})
.option('out', {
alias: 'o',
describe: 'Output folder',
default: './dist'
})
.option('dev', {
alias: 'd',
describe: 'Enable development mode',
default: false
})
.option('dev-port', {
alias: 'p',
describe: 'Set development server port',
default: 8080
})
.option('dev-host', {
alias: 'h',
describe: 'Set development server host',
default: 'localhost'
})
.help()
.argv
var bundler = require('./dist/cep-bundler-core.cjs')
bundler.compile({
out: argv.out,
devPort: argv.devPort,
devHost: argv.devHost,
root: argv.in === '.' || argv.in === './' ? process.cwd() : argv.in,
htmlFilename: 'index.html',
isDev: argv.dev
})