Frontastic CLI generate command

If you're creating a new Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code., you can use the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. to scaffold this new Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. for you. The Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. will create the tastic.jsx file, the schema.json file, and update the tastics.js file with your new Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code..

🚧

The schema file will need to be updated with the required properties and the formatting may need fixing on added and modified files to suit your eslint/prettier/... configuration.

Basic usage

The most basic usage is to run the command below:

frontastic generate tastic

You'll then be prompted to input a new name for your Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code.. This will be used as your folder name as well as the Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. name with Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. at the end, for example, productList would become productListTastic.

The below image shows what you'd see if you ran the command and inputted a name of productList:

You can then open your 'tastic.jsx' and 'schema.json' in the newly created folder of the same name and they'll already contain the below:

And below is the updated tastics.js file:

🚧

Once your schema.json is edited to how you'd like it to be, don't forget to upload it to the Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. section of the Frontastic studioFrontastic studio - The interface you use to manage, build, and edit all areas of your project and commerce sites. Previously known as `backstage`..

Other commands

If you use the below command, you can input the name of your Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. straight away:

frontastic generate tastic --name tasticName

If you use the below command, it will create the tastic.jsx file and the schema.json file, but your new Frontastic componentFrontastic component - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code. won't be added to the tastics.js file. You might want to do this if you have the file in a particular format but you'll have to add it manually.

frontastic generate tastic --skipTasticsJs

You can also get help within the CLI by using:

frontastic generate tastic --help

Did this page help you?