distributor icon indicating copy to clipboard operation
distributor copied to clipboard

Local development docs should mention wp-scripts, or install as part of setup

Open benlk opened this issue 1 year ago • 2 comments

Describe the bug

I'm installing this plugin to contribute a PR. When setting up the plugin, I noticed package.json and ran npm i. Checking package.json for commands, I ran npm run start. It appears that the local development workflow has an undocumented dependency on wp-scripts

Steps to Reproduce

  1. Clone this repo.
  2. npm install
  3. npm run start

Result:

$ npm run start

> [email protected] start
> wp-scripts start

sh: wp-scripts: command not found

Screenshots, screen recording, code snippet

No response

Environment information

  • OS: macOS 14.6
  • shell: bash, GNU bash version 3.2.57
  • node: 18.18.0
  • npm: 9.8.1

WordPress information

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

benlk avatar Sep 08 '24 20:09 benlk

I think there are three logical places to find this documentation:

  1. https://github.com/10up/distributor/blob/develop/CONTRIBUTING.md
  2. README.md
  3. in a new top-level DEVELOPING.md
  4. in the repo wiki

benlk avatar Sep 08 '24 20:09 benlk

We do already have developer documentation but it could be more explicit on the commands you need to run to get things ready.

I will say I can't reproduce the reported issue. You will need to use the proper node version, which is documented in the link above. Easiest way is to use nvm:

$ nvm use
$ npm install
$ npm run start

dkotter avatar Sep 09 '24 22:09 dkotter