'How to share node_modules and package.json files between two directories?
As I experiment with WordPress's new Gutenberg development methods, I noticed that I need to create individual block folders within the plugins directory. These are essentially the components that makeup the front-end and editor side of things.
I would like to understand two things:
How to install
node_modules
andpackage.json
files so that commands are accepted when not in a specific block directory folder.I would like to run certain builds with specific scripts, what are the proper commands to hand this procedure when outside of a block directory?
How do I setup my environment so that when I type in a command, it understand to compile no matter which plugin directory I am in?
Solution 1:[1]
The create-block package has scaffolding that allows you to create blocks and the package is undergoing heavy development right now that will allow you to have multiple blocks within one folder.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Will |