Plugin introduction
Poi is based on web, and all UI and procedure are done with web development techniques. Developers are supposed to have knowledge of following subjects:
- HTML, CSS
- JavaScript (ECMAScript 2017+)
- Node.js as well as npm
- React.js
- Redux as well as react-redux
- Electron
Documents of following libraries may be also useful during development:
- reselect
- react-bootstrap
- redux-observers
- and many other libraies listed in poi's dependencies
A poi plugin is essentially a node module. Installing, removing or updating the plugin in fact correspond to npm manupluations under the same name, which are managed by poi itself.
A plugin should follow npm related specifications, a package.json
under plugin root directory is necessary. The entry file is specified in main
field, and, if not provided, will be index.js
, or index.es
.
Plugin will interact with poi using:
- information provided in
package.json
- code blocks exported from the module and imported by poi via
import
orrequire
syntax - exported variables
A typical folder structure of poi plugin could be:
poi-plugin-foo-bar
├── assets
│ └── // images, stylesheets, etc
├── i18n
│ └── // i18n translation files
├── index.es // main entry point
├── lib
│ └── // 3rd party lib
├── LICENSE.md
├── package.json // npm package meta data file
├── README.md
├── redux
│ └── // redux related, e.g. reducers, actions, selectors,
└── views
└── // your react components