Welcome to the Plugin-Based App! 🎉
In this exercise, you will:
- Build your own plugin
- Register it in the system
- Resolve merge conflicts
- Analyze dependency trees
- Clone the repo:
git clone https://github.com/your-org/plugin-repo-lab.git
cd plugin-repo-lab
npm install
node app.js-
Create your plugin inside
/plugins/your-name-plugin/. -
Register it in
plugins.json. -
Test it using
node app.js.
- Each plugin is a JS module exporting a function:
module.exports.run = () => {
return "Hello from your plugin!";
};- Add your plugin path and name to
plugins.jsonlike so:
[
{
"name": "Your Name Plugin",
"entry": "./plugins/your-name-plugin/plugin.js"
}
]See plugins/sample-plugin/plugin.js for reference.
- Create a plugin
- Register in plugins.json
- Pull changes and resolve merge conflicts
- Run
npm lsand analyze dependencies