mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 20:33:03 +00:00
1 line
4.9 KiB
JavaScript
1 line
4.9 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{241:function(t,e,i){"use strict";i.r(e);var n=i(0),r=Object(n.a)({},function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"content"},[t._m(0),t._v(" "),i("p",[t._v("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.")]),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),i("ol",[i("li",[i("a",{attrs:{href:"https://github.com/strapi/strapi",target:"_blank",rel:"noopener noreferrer"}},[t._v("Fork the repository"),i("OutboundLink")],1),t._v(" to your own GitHub account.")]),t._v(" "),t._m(3),t._v(" "),t._m(4)]),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),i("p",[t._v("Create a development project")]),t._v(" "),t._m(8),t._v(" "),t._m(9),t._v(" "),i("ol",[t._m(10),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),i("li",[t._v("Start the server in the admin folder "),i("code",[t._v("cd pathToMyProject/myDevelopmentProject/admin && npm start")]),t._v(" and go to the following url "),i("a",{attrs:{href:"http://localhost:4000/admin",target:"_blank",rel:"noopener noreferrer"}},[t._v("http://localhost:4000/admin"),i("OutboundLink")],1),t._v(".")]),t._v(" "),t._m(13)]),t._v(" "),i("p",[t._v("Your are now ready to develop your own plugin and live-test your updates!")])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("h1",{attrs:{id:"quick-start"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#quick-start","aria-hidden":"true"}},[this._v("#")]),this._v(" Quick start")])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"development-environment-setup"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#development-environment-setup","aria-hidden":"true"}},[this._v("#")]),this._v(" Development Environment Setup")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("To setup the development environment please "),e("strong",[this._v("follow the instructions below:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[this._v("Clone it to your computer "),e("code",[this._v("git clone git@github.com:strapi/strapi.git")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[this._v("Run "),e("code",[this._v("npm run setup")]),this._v(" at the root of the directory.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("You can run "),e("code",[this._v("npm run setup:build")]),this._v(" to build the plugins' admin (the setup time will be longer)")])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"note custom-block"},[e("p",[this._v("If the installation failed, please remove the global packages related to Strapi. The command "),e("code",[this._v("npm ls strapi")]),this._v(" will help you to find where your packages are installed globally.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("h2",{attrs:{id:"plugin-development-setup"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#plugin-development-setup","aria-hidden":"true"}},[this._v("#")]),this._v(" Plugin development Setup")])},function(){var t=this.$createElement,e=this._self._c||t;return e("ol",[e("li",[this._v("Go to a folder on your computer "),e("code",[this._v("cd /path/to/my/folder")]),this._v(".")]),this._v(" "),e("li",[this._v("Create a new project "),e("code",[this._v("strapi new myDevelopmentProject --dev")]),this._v(".")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[this._v("To generate a new plugin "),e("strong",[this._v("run the following commands:")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[this._v("In your project folder "),e("code",[this._v("cd myDevelopmentProject && strapi generate:plugin my-plugin")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[this._v("Link the "),e("code",[this._v("strapi-helper-plugin")]),this._v(" dependency in your project folder "),e("code",[this._v("cd pathToMyProject/myDevelopmentProject/plugins/my-plugin && npm link strapi-helper-plugin")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[this._v("Link the "),e("code",[this._v("strapi-helper-plugin")]),this._v(" dependency in the "),e("code",[this._v("analytics")]),this._v(" plugin folder "),e("code",[this._v("cd pathToMyProject/myDevelopmentProject/plugins/analytics && npm link strapi-helper-plugin")]),this._v(".")])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[this._v("In a new terminal window open at the root of your project launch your Strapi server "),e("code",[this._v("strapi start")]),this._v(".")])}],!1,null,null,null);r.options.__file="quick-start.md";e.default=r.exports}}]); |