Skip to content

dont-code/plugin-report

Repository files navigation

image

Important !

This repository is now deprecated. All developments for Dont-code are now happening in the Monorepo repository

What was it for ?

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.

What is it ?

It contains a simple but complete repository you can fork to start your development. That includes:

  1. A Nx monorepo with a library seed containing the two plugins.
  2. An Application plugin-tester loading these plugins automatically and allowing you to test and debug them.
  3. Unit tests setup with Jest for each of these plugins.
  4. End 2 end tests example plugin-tester-e2e using Cypress.
  5. Github Action scripts to build and deploy the plugins automatically Workflows.

How to use it ?

To develop your own plugins using this seed repository, simply:

  1. Fork this repository in github.
  2. Install it, run some tests and the tester application to make sure it is working.
  3. If you want to create a plugin for a new Field, rename and modify the SeedField component.
  4. If you want to create any other plugin types, rename and modify the SeedEntity component.
  5. Updates the configuration to be injected to the Dont-code platform here SeedPlugin
  6. Ensure the plugin tester adds the updated module name of your plugin AppModule
  7. Modify the templates loaded by the plugin tester to ease usage of your plugin templates.json
  8. Run the plugin-tester application and debug your plugins there
  9. Modify and enhance the end 2 end tests of your plugins seed.spec.ts
  10. Modify the Github Action scripts to build, and deploy your plugins
  11. Test in the Dont-code Buidler and Previewer applications

How to build it ?

This project is a standard Angular - npm project, so the usual commands apply:

  1. Installing

npm install nx -g #Install nx.dev globally

npm install

  1. Running the tester application

nx run plugin-tester:serve

and point your browser to http://localhost:4200

  1. Running unit tests

nx run seed:test

  1. Running Cypress End to end tests

nx run plugin-tester-e2e:e2e

  1. Build and deploy

Just commit to Development or Release branch, the Github actions scripts will take care of it

  1. 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.

Thank you

This project was generated using Nx, visit the Nx Documentation to learn more.

About

Enable report pages and extract, with table and graphs, to be created and displayed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •