
If a user follows the directions in the plugin documentation quick start, several errors will show up, as documented in: https://github.com/strapi/strapi/issues/1116 https://github.com/strapi/strapi/issues/1972 This updates the documentation so that a user new to the project will be able to have success. It follows the comments from https://github.com/strapi/strapi/issues/1972#issuecomment-422321650 & https://github.com/strapi/strapi/issues/1116#issuecomment-386710389 to re-write the docs to match expected behavior.
1.6 KiB
Quick start
To facilitate the development of a plugin, we drastically reduce the amount of commands necessary to install the entire development environment. Before getting started, you need to have Node.js (v8) and npm (v5) installed.
Development Environment Setup
To setup the development environment please follow the instructions below:
- Fork the repository to your own GitHub account.
- Clone it to your computer
git clone git@github.com:strapi/strapi.git
. (or your fork) - Run
cd strapi && npm run setup
You can run npm run setup:build
to build the plugins' admin (the setup time will be longer)
Create a development project
- Create a new project
cd .. && strapi new myDevelopmentProject --dev
. cd myDevelopmentProject && strapi start
To start the strapi project
::: note
If the installation failed, please remove the global packages related to Strapi. The command npm ls strapi
will help you to find where your packages are installed globally.
:::
Plugin development Setup
In a new terminal window:
- Generate a new plugin:
cd /path/to/myDevelopmentProject && strapi generate:plugin my-plugin
- Install admin dependencies and build:
cd /admin && npm setup
npm start
When finished with plugin modifications:
cd /path/to/myDevelopmentProject && npm run setup ---plugins
To rebuild plugins:
Run this inside the cloned or forked repo of strapi
cd strapi && npm run setup:build
Your are now ready to develop your own plugin and live-test your updates! The working local URI should be localhost:4000/admin.