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

Add/local dev environment #20

Closed
wants to merge 3 commits into from
Closed

Add/local dev environment #20

wants to merge 3 commits into from

Conversation

gaambo
Copy link

@gaambo gaambo commented Sep 20, 2023

I plan to suggest two PRs for the variations filter and had to set up a local dev environment to make changes. Therefore, I thought I might as suggest it as an PR for you and other contributors.

For convenience, I've added an easier local development environment using @wordpress/env.
This allows for simpler setup of local dev environment and also ensures all contributors have the same local dev setup. More information about that package here: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-env/
I've also added npm scripts to make it easier to use the wp-env version installed in the package. The naming of these scripts is arbitrary.

I've also fixed the node/npm version used in this plugin. I guessed it was initially v14 (because all versions above try to migrate the package-lock.json). I then updated it to v16 to be on par with Gutenberg. This makes it easier for developers to use the correct node/npm version (using nvm).

Testing:

  1. Make sure you have gut docker setup (see @wordpress/env prerequisites)
  2. Run nvm use if you have multiple node versions installed
  3. Run npm install
  4. Run npm run dev:start to startup local dev environment
  5. Visit WordPress (probably on localhost:8888) and ensure the plugin is installed, active and usable.

Nothing about the plugin functionality or the build process changes/should change.

@gaambo gaambo mentioned this pull request Sep 20, 2023
2 tasks
@gaambo gaambo closed this by deleting the head repository Jan 8, 2024
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