![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
seng-generator
Advanced tools
A CLI generator to create code based on templates
$ npm install -g seng-generator
The easiest command runs a wizard to create code based on a template.
$ sg wizard
Note: Names can be inputted in any format (slug-case, camelCase, PascalCase etc.).
Seng generator is very flexible, because it's not linked to a language or technology. Seng generator requires custom user created templates to generate code.
creating custom templates
Creating a template is really easy. The first step is to create a folder that will contain all your templates. Inside the folder you create a folder (don't use spaces) with the name of your template. The name of the folder is important because you have to use the name to create code based on that template.
Inside that folder you can add/create your own files. There are no limits it can contain as much files and folder as possible.
You can create as many templates as you need. It's also possible to create multiple template folders (a comma separated templatePath can be used if there are multiple folders with templates). You can for example create a template folder per project so it can be shared with other project members together with the rest of the code.
Templates can be customized by using variables. Variables can be used as folder name in the following format {variable}
.
Inside files you can use the handlebar syntax {{variable}}
.
available variables:
name
: Name in it's original formatname_pc
: Name converted to PascalCasename_sc
: Name converted to slug-casename_cc
: Name converted to CamelCasename_snc
: Name converted to snake_caseDon't forget to run $ sg init
or set the template path with $ sg settings
to use your custom templates with seng-generator
There are five layers of settings (From least to most important):
An option will always override a local setting etc.
The five layers combined determine the settings used in every command.
You can see the settings of a directory by running $ sg settings
.
This is without the template specific settings and without the option overrides of course. The same command can be used to modify the settings.
Show help
$ sg -h
Starts a wizard to create code based on a template.
$ sg wizard [type] [name]
Arguments:
type
: (Optional) The template you want to use.name
: (Optional) The name you want to use in the template.Examples:
$ sg wizard
$ sg wizard block
$ sg wizard component ScrollBar
Create a local settings file (.senggenerator). Local settings always override global settings.
$ sg init
Directly create a store module based on the current settings.
$ sg <type> <name>
Arguments:
type
: The template you want to use.name
: The name you want to use. Can be a comma seperated list to create multiple (example1,example2).Options:
-d, --destination <destination>
: Override the destination for store module.-p, --template-path <template-path>
: Override template path.-s, --sub-directory <subdirectory>
: Set subdirectory. This path is added to the destination path.-f, --force
: Force creation. By default it's impossible to create code if the destination path doesn't exist. This option forces the creation of code and will generates the destination folders if they don't exist.Examples:
$ sg functional-component check-box
$ sg block video -d ./src/components
$ sg component Button -s ./atoms
Set or display settings. Without any options it will show the settings. By default it will set the settings locally in a .senggenerator file. You can also set global settings by using the global option.
$ sg settings
Options:
-d, --destination <destination>
: Set the destination path.-t, --template-path <template-path>
: Set template path.-l, --log
: Log global or local settings depending on the global flag.-g, --global
: Set global settings.Examples:
$ sg settings -l
$ sg settings -d ./src/app/components -t ./template
$ sg settings -g -d ./components
Reset global settings to the defaults.
$ sg reset
FAQs
A CLI generator to create code based on templates
The npm package seng-generator receives a total of 138 weekly downloads. As such, seng-generator popularity was classified as not popular.
We found that seng-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.