mirror of
https://github.com/strapi/strapi.git
synced 2025-07-08 17:45:30 +00:00
1.8 KiB
1.8 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
. - Run
npm run setup
at the root of the directory.
You can run
npm run setup:build
to build the plugins' admin (the setup time will be longer)
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
Create a development project
- Go to a folder on your computer
cd /path/to/my/folder
. - Create a new project
strapi new myDevelopmentProject --dev
.
To generate a new plugin run the following commands:
- In your project folder
cd myDevelopmentProject && strapi generate:plugin my-plugin
. - Link the
strapi-helper-plugin
dependency in your project foldercd pathToMyProject/myDevelopmentProject/plugins/my-plugin && npm link strapi-helper-plugin
. - Link the
strapi-helper-plugin
dependency in theanalytics
plugin foldercd pathToMyProject/myDevelopmentProject/plugins/analytics && npm link strapi-helper-plugin
. - Start the server in the admin folder
cd pathToMyProject/myDevelopmentProject/admin && npm start
and go to the following url http://localhost:4000/admin. - In a new terminal window open at the root of your project launch your Strapi server
strapi start
.
Your are now ready to develop your own plugin and live-test your updates!