Skip to content

Commit

Permalink
feat: change logging of scripts bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
swashata committed Oct 13, 2018
1 parent e1f0a65 commit 7bb89b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
4 changes: 1 addition & 3 deletions examples/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"scripts": {
"bootstrap": "wpackio-scripts bootstrap",
"exbuild": "wpackio-scripts build",
"exstart": "wpackio-scripts start",
"build": "wpackio-scripts build",
"start": "wpackio-scripts start"
"exstart": "wpackio-scripts start"
},
"dependencies": {
"@wpackio/scripts": "^0.0.3"
Expand Down
14 changes: 4 additions & 10 deletions packages/scripts/src/bin/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export async function bootstrap(
const spinner = ora({ spinner: 'dots3' });

if (done.deps && done.deps.dependencies.length) {
console.log(
`${logSymbols.info} need to install following dependencies`
);
console.log(`🍪 need to install following dependencies\n`);
console.log(
` ${bulletSymbol} ${chalk.yellow(
done.deps.dependencies.join(', ')
Expand All @@ -72,14 +70,10 @@ export async function bootstrap(
`installing dependencies${watchEllipsis} may take a while`
);
await execa(command, [add, ...done.deps.dependencies]);
spinner.succeed('done installing dependencies');
spinner.succeed('done installing dependencies\n');
}
if (done.deps && done.deps.devDependencies.length) {
console.log(
`️${
logSymbols.info
} need to install following dev dependencies\n`
);
console.log(`⚙️ need to install following dev dependencies\n`);
console.log(
` ${bulletSymbol} ${chalk.green(
done.deps.devDependencies.join(', ')
Expand All @@ -94,7 +88,7 @@ export async function bootstrap(
devParam,
]);

spinner.succeed('done installing dependencies');
spinner.succeed('done installing dependencies\n');
}
} catch (e) {
console.log(
Expand Down
2 changes: 1 addition & 1 deletion packages/scripts/src/scripts/Bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export class Bootstrap {
? // tslint:disable-next-line:non-literal-require
require(this.packageJsonPath)
: {
name: '',
name: projectContext.appName,
};
// Check if script is already present
const scripts: { [x: string]: string } = {
Expand Down

0 comments on commit 7bb89b6

Please sign in to comment.