Skip to content

Conversation

@DenysVuika
Copy link
Contributor

@DenysVuika DenysVuika commented Aug 20, 2019

What kind of change does this PR introduce?
feature

Did you add tests for your changes?
no, manual tests only

Summary
Fixes #871

  • Adds missing default values for preact create --help
  • Moves "dirExits" (create command) to the utils
  • Adds support for --license option for create (defaults to MIT)
  • Introduces support for additional template variables:
    • {{ pkg-install }} => npm install or yarn
    • {{ pkg-run }} => npm run or yarn
    • {{ pkg-add }} => npm install or yarn add
    • {{ now-year }} => current year
    • {{ license }} => license or MIT

Example for new options:

preact create default yarnapp --yarn --install=false --license=Apache

Does this PR introduce a breaking change?
no

Other information
See also: preactjs-templates/default#29

}

exports.isDir = isDir;
exports.dirExists = dirExits;
Copy link
Member

@ForsakenHarmony ForsakenHarmony Aug 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for consistency with the rest we probably want the export inline, can keep the named function if v8 doesn't infer that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, updated

@ForsakenHarmony ForsakenHarmony merged commit 9cef786 into preactjs:master Aug 21, 2019
@ForsakenHarmony
Copy link
Member

Thanks for your contributions 🙏

@DenysVuika
Copy link
Contributor Author

No problem 😊

@DenysVuika DenysVuika deleted the package-manager-templates branch August 21, 2019 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Yarn template still uses npm in README.md and package.json

2 participants