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

Chore: Automatically install example dependencies #164

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

btmills
Copy link
Member

@btmills btmills commented Nov 15, 2020

Previously, CI was explicitly running the install-examples script as its own step. This was also necessary but not documented locally, so git clone; npm install; npm test would show a couple failures when the examples inherited the wrong ESLint dependency. The examples' dependencies should now be installed automatically when running npm install locally without any arguments.

Originally reported in #163.

For reviewers: Based on my reading of https://docs.npmjs.com/cli/v6/using-npm/scripts, this is a safe usage of the prepare script, but I'd appreciate a second set of eyes on that. The goal is to run as part of npm install locally but not when the plugin is a dependency. The additional runs before packing and publishing are unnecessary but I don't think they should cause a problem. I'll do a rc.1 release after merging this just to make sure there aren't any unexpected kinks. The fallback plan is just to document the second step.

Previously, CI was explicitly running the `install-examples` script as
its own step. This was also necessary but not documented locally, so
`git clone; npm install; npm test` would show a couple failures when the
examples inherited the wrong ESLint dependency. The examples'
dependencies should now be installed automatically when running `npm
install` locally without any arguments.

Originally reported in #163.
@btmills btmills added the chore label Nov 15, 2020
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

Yup, that should work. "prepare" will be called before "install" when running npm install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants