create-vertx-app v0.1.98
vertx-starter
This is a simple online generator for vert.x projects
The whole SPA is data-driven, build tools can be added to the file metadata/buildtools.json.
Usage from cli
Build the required files with
gulp build-cliAnd then run the cli with
npm run cliIf you want a zip output you can use -z flag
Preset documentation
Look at preset specific documentation for more info:
Data files
buildtools.json
buildtools.json file is composed of several properties:
idan unique id for the toolfilejust a placeholder to show on screen (has no side effects)fieldsa list of properties that will be available to the template enginelanguagessupported languagestemplatessimple templates that apply to all languagesdefaultsdefault dependencies that are automatically selected for this toolexecutableslist of template elements that should be marked as executable (required for Unix OSes)bloban existing zip file that will be merged into the final zip
fields
A field can be seen as a variable that can be used later on the code generation.
It allows the following properties:
keyunique idlabelthe label for the keyrequiredbooleanprefilla default value for the keytypeof the field. Allowed:input,checkbox,file. Default:input
Note on type: file: In browser files are feed in the engine as string UTF-8 decoded, while on CLI they are paths to the file
languages
A language represents a programming language and has the following properties:
idan unique id (should match thevertx-lang-xxx)templatesan extra list of templates for this language
components.json
Components represent all dependencies you can add to the project. Components can be added to the file components.json
Components have the following properties:
groupIdartifactIdversionstackis the component part of the official stackdescriptioncoreis a special marker for languages like scala. If true it means that there are no prefixed artifacts
presets.json
Preset projects can be added to the generator. They are listed in the file presets.json.
A preset has the following properties:
idan unique iddescriptiona simple descriptiondependenciesa list of dependencies to be added by defaultbuildtoolthe tool that this preset expect to be presentlanguagethe language this preset requirestemplatesa list of extra templates that are required for this preset (no file name translation will occurr)executablesa list of extra executable templates that are required for this presetbloban existing zip file that will be merged into the final zip (will override build tool one)
Templates
The generated project comes from the handlebars templates under templ for each build tools there should be a folder. In this folder, all files will be handled as handlebars templates.
When dealing with templates that need to live in a specific package name the following rules apply:
- The metadata should refer to the file using the following pattern:
some-dir/{packageName}/File.extension - The file should be saved excluding any package e.g.:
some-dir/File.extension
Important to note that extra packages after the {packageName} are allowed e.g.: some-dir/{packageName}/impl/File.extension.
Build process
There is no build process except if templates are added/modified. In this case, handlebars needs to precompile the templates.
This can be done using NPM, start by installing the required dependencies:
npm installAnd then compile the templates:
npm run buildRelease
Increase the version in package.json will generate a new sw.js cache version and invalidate the old one.
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago