Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
feat(output): provided output about lifting steps
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Apr 28, 2020
1 parent f282c9d commit a9bfeb2
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 2 deletions.
66 changes: 64 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,8 @@
"rollup-plugin-auto-external": "2.0.0",
"sinon": "9.0.2",
"travis-lint": "1.0.0"
},
"dependencies": {
"@travi/cli-messages": "^1.0.4"
}
}
3 changes: 3 additions & 0 deletions src/lift.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import {info} from '@travi/cli-messages';
import liftScripts from './scripts';

export default async function ({results, projectRoot}) {
info('Lifting JavaScript-specific details');

await liftScripts({projectRoot, scripts: results.scripts});
}
3 changes: 3 additions & 0 deletions src/scripts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {promises as fs} from 'fs';
import {info} from '@travi/cli-messages';

export default async function ({projectRoot, scripts}) {
if (scripts) {
info('Adding npm scripts to `package.json`', {level: 'secondary'});

const pathToPackageJson = `${projectRoot}/package.json`;

const existingPackageJsonContents = JSON.parse(await fs.readFile(pathToPackageJson, 'utf8'));
Expand Down

0 comments on commit a9bfeb2

Please sign in to comment.