Skip to content

Commit

Permalink
use process.argv from bin
Browse files Browse the repository at this point in the history
  • Loading branch information
imhoffd committed Dec 30, 2017
1 parent be2eca7 commit 14d470f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/build.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

const { run } = require('../dist/build');
run().catch(e => console.error(e));
run(process.argv).catch(e => console.error(e));
2 changes: 1 addition & 1 deletion bin/deploy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node

const { run } = require('../dist/deploy');
run().catch(e => console.error(e));
run(process.argv).catch(e => console.error(e));
4 changes: 2 additions & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const IONIC_TYPE_DIRECTORIES = ['ionic1', 'ionic-angular', 'ionic-core-angular']
export const BUILD_DIRECTORY = path.resolve(REPO_DIRECTORY, 'build');
export const STARTERS_LIST_PATH = path.resolve(BUILD_DIRECTORY, 'starters.json');

export async function run() {
const starter = process.argv[2];
export async function run(argv: string[]) {
const starter = argv[2];

console.log('-----');
console.log(chalk.cyan.bold('BUILD'));
Expand Down
4 changes: 2 additions & 2 deletions src/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const cloudfront = new CloudFront({ apiVersion: '2017-03-25' });

const keys: string[] = [];

export async function run() {
await build();
export async function run(argv: string[]) {
await build(argv);

console.log('------');
console.log(chalk.cyan.bold('DEPLOY'));
Expand Down

0 comments on commit 14d470f

Please sign in to comment.