Skip to content

Commit

Permalink
feat(scaffold-project): add some default config
Browse files Browse the repository at this point in the history
- added javascript language scaffolder
- added myself as default copyright holder
  • Loading branch information
trevtrich committed Feb 19, 2020
1 parent b93e28d commit 29cc4b6
Show file tree
Hide file tree
Showing 3 changed files with 194 additions and 3 deletions.
186 changes: 186 additions & 0 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@
"@oclif/command": "1.5.19",
"@oclif/config": "1.14.0",
"@oclif/plugin-help": "2.2.3",
"update-notifier": "4.1.0",
"@travi/project-scaffolder": "8.4.1"
"@travi/javascript-scaffolder": "10.9.3",
"@travi/project-scaffolder": "8.4.1",
"update-notifier": "4.1.0"
},
"devDependencies": {
"@babel/register": "7.8.3",
Expand Down
6 changes: 5 additions & 1 deletion src/commands/scaffold-project.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
const {Command} = require('@oclif/command');
const {scaffold: scaffoldJavaScript} = require('@travi/javascript-scaffolder');
const {scaffold} = require('@travi/project-scaffolder');

class ScaffoldProject extends Command {
async run() {
this.log('Starting the scaffolder.');

scaffold().catch(err => {
scaffold({
languages: {JavaScript: scaffoldJavaScript},
overrides: {copyrightHolder: 'Trevor Richardson'}

This comment has been minimized.

Copy link
@travi

travi Feb 19, 2020

Contributor

worth being aware... not documented yet, but there is also the option to provide things like this as a decision. overrides provides a default answer to a prompt, but you still have to see the prompt. decisions answer the prompts and skip showing them

This comment has been minimized.

Copy link
@trevtrich

trevtrich Feb 19, 2020

Author Owner

oh nice. good to know 👍

This comment has been minimized.

Copy link
@travi

travi Feb 19, 2020

Contributor

my integration tests are the best example usage at this point, but should hopefully be enough to trace back and understand the wiring details.

i intend to move some of the "overrides" to decisions for existing implementations at some point to reduce the number of decisions a person has to make when it is always expected to be the same answer.

}).catch(err => {
console.error(err); // eslint-disable-line no-console
process.exitCode = 1;
});
Expand Down

0 comments on commit 29cc4b6

Please sign in to comment.