Use CGA to build a front-end project
create-gem-app is a command line tool that can quickly build your front-end project based on the template repo:
Directory structure
Import dependencies using absolute paths
Use tsconfig-paths-webpack-plugin to allow you to import dependencies using absolute paths in the module:
Using absolute paths can make you more aware of what you depend on.
PWA support
The project uses workbox-webpack-plugin and webpack-pwa-manifest Added PWA support, you can customize the details according to your project in webpack.config.json.
Mock API
The project comes with the Mock API function, use the following command to enable the Mock function:
Use intermock to generate content based on the RESTFul API type definition:
Other templates
create-gem-app uses gem-boilerplate as a template by default. In fact, it also supports other templates that use Gem:
lib: Suitable for building UI libraries based onGemElementwasm: Used to build a custom element library with Rust/WebAssembly
You can specify the template with the -t parameter: