This repository is now deprecated. All developments for Dont-code are now happening in the Monorepo repository
This project allows developers to quickstart their development of a Plugin for the Dont-code no-code / low-code platform. It provides example for two kinds of plugins:
- Seed Field adds a new type of field to the platform.
- Seeded Entity shows how to modify the Dont-code model and manage the updated display.
It contains a simple but complete repository you can fork to start your development. That includes:
- A Nx monorepo with a library seed containing the two plugins.
- An Application plugin-tester loading these plugins automatically and allowing you to test and debug them.
- Unit tests setup with Jest for each of these plugins.
- End 2 end tests example plugin-tester-e2e using Cypress.
- Github Action scripts to build and deploy the plugins automatically Workflows.
To develop your own plugins using this seed repository, simply:
- Fork this repository in github.
- Install it, run some tests and the tester application to make sure it is working.
- If you want to create a plugin for a new Field, rename and modify the SeedField component.
- If you want to create any other plugin types, rename and modify the SeedEntity component.
- Updates the configuration to be injected to the Dont-code platform here SeedPlugin
- Ensure the plugin tester adds the updated module name of your plugin AppModule
- Modify the templates loaded by the plugin tester to ease usage of your plugin templates.json
- Run the plugin-tester application and debug your plugins there
- Modify and enhance the end 2 end tests of your plugins seed.spec.ts
- Modify the Github Action scripts to build, and deploy your plugins
- Test in the Dont-code Buidler and Previewer applications
This project is a standard Angular - npm project, so the usual commands apply:
- Installing
npm install nx -g #Install nx.dev globally
npm install
- Running the tester application
nx run plugin-tester:serve
and point your browser to http://localhost:4200
- Running unit tests
nx run seed:test
- Running Cypress End to end tests
nx run plugin-tester-e2e:e2e
- Build and deploy
Just commit to Development or Release branch, the Github actions scripts will take care of it
- Debugging in Builder or Previewer application We have setup some commands to enable debugging the plugin when run inside the Ide or Previewer. Using npm link is difficult and doesn't work all the time, so we use Yalc.
npm install yalc -g Installs the Yalc tool globally
npm run publish-all Publish the library in Yalc repository, after version increase (to bypass Angular caching)
Then in the builder project (ide-ui) :
yalc add @dontcode/plugin-seed to install the plugin using Yalc
You can now set breakpoints in your plugin classes running in the builder, and if you modify your plugin code, just run
npm run publish-all again to rebuild it and reload in the builder application.
This project was generated using Nx, visit the Nx Documentation to learn more.
