With this CLI you can generate base code to start to program fast. Also you can personalize the base code to generate.
A command line interface for Frontend development
Usage: tfverse [OPTIONS] [NAME]
Arguments:
[NAME] Project name
Options:
-t, --tool <TOOL> Template tool to choose
-a, --arch <ARCH> Frontend piece or project template
-l, --language <LANGUAGE> TypeScript or JavaScript
-s, --styles <STYLES> Styles type
-p, --path <PATH> Template path to generate
-y, --sure Accept all questions
-g, --global Set configuration
-c, --config <FILE> Config file to customize this CLI
-h, --help Print help
-V, --version Print version
To personalize the cli you must create a .json file. And use the following schema.
The commented paths are the default values.
{
"$schema": "https://gvtmpjzawvdhojsxlece.supabase.co/storage/v1/object/public/cli/schema/config.json",
"repository": "git@github.com:YOUR_ORG_OR_YOUR_USER",
"root": "",
"paths": {
"globals": {
"contexts": null,
"schemas": null,
"services": null,
"types": null,
"ui": null
},
"react": {
"hocs": null,
"hooks": {
"global": null,
"internal": null
},
"locales": null,
"routes": null
},
"svelte": {
"actions": null,
"layouts": null,
"locales": null,
"pages": null,
"stores": null
},
"vanilla": {
"classes": null,
"functions": null
}
},
"tools_type": {
"vanilla": [
[
"base",
{
"name": "REPOSITORY_NAME",
"project": "main",
"library": null
}
]
],
"react": [
[
"base",
{
"name": "REPOSITORY_NAME",
"project": "main",
"library": null
}
]
],
"svelte": [
[
"base",
{
"name": "REPOSITORY_NAME",
"project": "main",
"library": null
}
]
]
},
"templates": {
"react": {
"component": null,
"context": null,
"hoc": null,
"hook": null,
"layout": null,
"page": null,
"schema": null,
"service": null
},
"svelte": {
"action": null,
"context": null,
"layout": null,
"page": null,
"schema": null,
"service": null,
"store": null,
"component": null
},
"vanilla": {
"class": null,
"component": null,
"function": null,
"layout": null,
"page": null,
"schema": null,
"service": null
}
}
}
If you want to personalize this CLI you must create the following files inside the folders that you set in the templates option.
| Path |
To |
/component.(ts|js)x |
Component |
/import.(ts|js) |
Component imports |
/proptypes.ts |
Component props |
/styles.(ts|js) |
Component styles |
/styles.responsive.(ts|js) |
Component responsive |
| Path |
To |
/component.svelte |
Component |
/script.(ts|js).svelte |
Component script |
/import.(ts|js) |
Component imports |
/proptypes.ts |
Component props |
/styles.(ts|js) |
Component styles |
/styles.responsive.(ts|js) |
Component responsive |
Not ready yet
| Path |
To |
/layout.(ts|js)x |
Layout |
/layout.styles.(ts|js)x |
Layout barrel styles |
/proptypes.ts |
Layout props |
/styles.(ts|js) |
Layout styles |
/styles.responsive.(ts|js) |
Layout responsive |
| Path |
To |
/layout.svelte |
Layout |
/layout.styles.(ts|js)x |
Layout barrel styles |
/script.(ts|js).svelte |
Layout script |
/proptypes.ts |
Layout props |
/styles.(ts|js) |
Layout styles |
/styles.responsive.(ts|js) |
Layout responsive |
Not ready yet
| Path |
To |
/page.(ts|js)x |
Page |
/proptypes.ts |
Page props |
/locale.json |
Locale for i18n |
/i18n.(ts|js) |
i18n context |
/styles.(ts|js) |
Page styles |
/styles.responsive.(ts|js) |
Page responsive |
/router.(ts|js) |
Router |
/route.(ts|js) |
Route |
/config.(ts|js) |
Config file project |
/config.aliases.(ts|js) |
Project aliases |
/tsconfig.json |
TSConfig file project |
/tsconfig.aliases.json |
TSConfig aliases |
| Path |
To |
/page.svelte |
Page |
/script.(ts|js).svelte |
Page script |
/locale.json |
Locale for i18n |
/i18n.(ts|js) |
i18n store |
/proptypes.ts |
Page props |
/styles.(ts|js) |
Page styles |
/styles.responsive.(ts|js) |
Page responsive |
/config.(ts|js) |
Svelte config |
/config.aliases.(ts|js) |
Svelte config aliases |
Not ready yet
| Path |
To |
/schema.(ts|js)x |
Schema |
/proptypes.ts |
Schema props |
| Path |
To |
/schema.(ts|js)x |
Schema |
/proptypes.ts |
Schema props |
/proptypes.imports.ts |
Schema props imports |
Not ready yet
| Keyword |
Description |
NAME_CAMEL |
Camel case name |
NAME_PASCAL |
Pascal case name |
NAME_DASH |
Dash case name |
NAME_CONSTANT |
Constant case name |
NAME_SNAKE |
Snake case name |
NAME_LOWER |
Lowercase name |
NAME |
User input name |
NAMESPACE |
User input namespace |
EXT_STYLES |
Styles extension |
| Keyword |
Description |
SCRIPT |
Script tag |
| Keyword |
Description |
/* NEXT_TYPE */ |
Next type |
/* PROPTYPES */ |
PropTypes |
| Keyword |
Description |
/* NEXT_ALIAS */ |
Alias for next page |
/* NEXT_LOCALE */ |
Locale for next page |
/* NEXT_ROUTE */ |
Route for next page (Only ReactJS) |
| Keyword |
Description |
/* NEXT_IMPORT */ |
Next import |