Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npx to run Yeoman #5

Merged
merged 2 commits into from Nov 9, 2017
Merged

Use npx to run Yeoman #5

merged 2 commits into from Nov 9, 2017

Conversation

ianpartridge
Copy link
Contributor

@ianpartridge ianpartridge commented Nov 8, 2017

Currently, we run npm i -g generator-swiftserver every time a user invokes kitura init or kitura create. This ensures that the generator is installed into the user's NPM global package directory.

We are unable to install the generator during Homebrew installation of the CLI because Homebrew installs global packages into Cellars which Yeoman can't find, and we can't trick Yeoman without breaking people who are using tools like nvm.

NPX is a relatively new addition to the Node.js ecosystem which simplifies the running of CLI tools from the registry (like Yeoman) and makes it unnecessary to install global packages at all.

This PR updates the Kitura CLI so it invokes Yeoman via npx. A consequence of this is we will be able to simplify the Homebrew installation of the CLI so it does not have to install Yeoman either.

My belief is that this will sidestep a whole bunch of rare NPM issues that users have reported.

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.

None yet

1 participant