create
create
createCreates a new Frontity project.
npx frontity create [project-name] [options]Arguments
[project-name]
[project-name]The name of your Frontity project. It will also be the name of the folder that this command will create for you with the files of your Frontity project inside.
[options]
[options]Option
Description
The theme to use
--typescript
Adds support for TypeScript. Related environment variable: FRONTITY_CREATE_TYPESCRIPT
--use-cwd
Generates the project in the current directory
--no-git
frontity create initializes by default a git repository. This option skips this initialization.
--no-prompt
Skips prompting the user for options. Related environment variable: FRONTITY_CREATE_NAME
--help
Output usage information
The --theme option
--theme optionYou can either pick one of the two official Frontity themes (--theme @frontity/mars-theme or --theme @frontity/twentytwenty-theme) or use any other custom theme as long as it's published on npm. Just pass the theme name on the command-line like --theme ThemesPackageNameInNPM.
Examples
Create a Frontity project named
my-awesome-project:
Create a Frontity project named
my-awesome-projectusing Frontity Chakra theme:
If you leave out both of the arguments, the CLI will run an interactive shell asking for these inputs:
Environment Variables
FRONTITY_CREATE_NAME
FRONTITY_CREATE_NAMEIf you pass the --no-prompt flag to the create command, the CLI will use the name from this FRONTITY_CREATE_NAME environment variable.
If the CLI cannot find a FRONTITY_CREATE_NAME environmental variable, it will prompt for the name of the package.
Example:
FRONTITY_CREATE_TYPESCRIPT
FRONTITY_CREATE_TYPESCRIPTAdds support for TypeScript in the project created.
Example:
Last updated
Was this helpful?