fix: add lerna commands to plugins package.json
The basics
- [x] I validated my changes
The details
Resolves
Fixes an issue where lerna commands could not be run from the root package.json file. For instance, the build script is cd plugins && lerna run build, which was failing.
The issue was that npm run uses the contents of node-modules/.bin in the directory where it is run. The command was run at the root level, meaning that lerna was expected to be installed at the root level, but due to https://github.com/google/blockly-samples/pull/2446 lerna is only installed inside examples/ and plugins.
Calling cd plugins && npm run build, with build defined as lerna run build in the plugin package.json, resolves this issue by changing which directory lerna is expected to be installed in.
Verified by running several of the changed commands from the top level, including build, deploy:prepare, and clean.
Proposed Changes
- Add several commands to the plugins
package.jsonfile, all of which just call lerna commands. - Change root
package.jsonscripts to usenpm run <command>instead oflerna run <command>after changing directories.
Additional Information
I'm moderately concerned by other changes in blockly-samples passing PR checks when this was broken. What were they using for lerna? How was building and testing working?