@haulmont/jmix-generator-example v1.1.0
Custom jmix front generator
This project is an example of creating and usage custom generator for jmix frontend. Generator can create screens with bar chart, line chart or pie chart and add it to app frontend module. Note that generated screens required extra dependencies that will not be added automatically by a generator. If app doesn't contain @haulmont/jmix-addon-charts in package.json, dependencies should be installed via npm
npm install @haulmont/jmix-addon-chartsBuild
npm run buildAfter build, generators: react-typescript:bar-chart, react-typescript:line-chart, react-typescript:pie-chart will be available in dist folder and could be used in gen-jmix-front by passing folder to custom-generator-paths argument
npx gen-jmix-front react-typescript:bar-chart --custom-generator-paths jmix-front-generator-example/distUsage in jmix project
Note that all commands below should be executed in fontend module folder of jmix-project.
- install generator
npm install @haulmont/jmix-generator-example --prefix generation --save-dev- generate
line-chartscreen, typeLineChartas component name and menu item answers
node generation/node_modules/@haulmont/jmix-front-generator/bin/gen-jmix-front.js react-typescript:line-chart --custom-generator-paths generation/node_modules/@haulmont/jmix-generator-example/dist --model generation/projectModel.json --dest src/app --dirShift ../- install charts deps in app if they are not installed yet
npm install @haulmont/jmix-addon-chartsStart fronted app. Chart screen will be available at http://localhost:3000/chart