A cli tool to generate cra-template from current create-react-app project.

Overview

Create Cra Template

brand

A cli tool to generate cra-template from current create-react-app project.

npm npm bundle size

GitHub tag (latest by date) GitHub repo size lines of code

Usage

Inside your own create-react-app project:

npx create-cra-template
# or
yarn create cra-template

Or install globally

yarn global add create-cra-template
cct
# or create-cra-template

template.json and template will be generated. You can also edit template.json manually.

Publish to npm

Make sure your package.json name is cra-template-[YOUR_TEMPLATE_NAME]

Example:

{
  "name": "cra-template-ui"
}
npm login
npm publish

Use your own template

npx create-react-app --template [YOUR_TEMPLATE_NAME]
# or
yarn create react-app --template [YOUR_TEMPLATE_NAME]

CLI details

There two commands create-cra-template and cct.

Run cct --help to see more details.

cct

 🕹 📤 A cli tool to generate cra-template from current create-react-app
 project.

Commands:
  cct                Generate template                                 [default]
  cct clear [--all]  Clear previous exports

Options:
  -h, --help     Show help                                             [boolean]
  -v, --version  Show version number                                   [boolean]
  -c, --clear    Clear previous exports before generation              [boolean]

Use in Node

Below is a simple example of using create-cra-template in your project:

const {
  generateTemplateJson,
  generateTemplateFiles,
  clearPackageFileField,
  clearTemplateFiles
} = require('create-cra-template')

const rootDir = process.cwd()

;(async()=>{
  await clearPackageFileField(rootDir)
  await clearTemplateFiles(rootDir)
  await generateTemplateJson(rootDir)
  await generateTemplateFiles(rootDir)
})()

Built-in templates

cra-template-popular

Work in progress...

cra-template-ui

Work in progress...


🎉 That's it! Enjoy your own template.

You might also like...
Template for developing react app with structure inspired by Ignite CLI's react native boilerplate

React Template A react template heavily inspired by Ignite CLI's boilerplate for React Native, it uses a couple of generators with simple template cus

A simple demo to show the boilerplate-cra from React Avançado

This is a Create React App boilerplate with some configurations from React Avançado Course. What is inside? This project uses lot of stuff as: Create

This is a very simple boilerplate made with CRA, React Router, Styled Components and Storybook.

This is a Create React App boilerplate with some configurations from React Avançado Course. What is inside? This project uses lot of stuff as: Create

React.JS custom Boilerplate with CRA

React.JS custom Boilerplate with CRA

This is a web app that displays current stats of your favorite Premier League team.
This is a web app that displays current stats of your favorite Premier League team.

Premstats This is a web app that displays current stats of your favorite Premier League team. Built With ReactJS Technologies used Redux React Router

Create-editorconfig - A simple npm script to generate an .editorconfig file

Create EditorConfig A simple npm script to generate an .editorconfig file. You d

CLI, Local API and Local client for React and Typescript: Build a Portfolio Project course.

🚀 JBook (CLI, Local API, Local Client) Complete project of React and Typescript: Build a Portfolio Project course. You can find the whole repo at Git

This project shows how to dockerize React CLI application
This project shows how to dockerize React CLI application

Angular Docker This project shows how to dockerize React CLI application Require

React package that is an Ergo dApp Connector. Current supported wallets are Nautilus Wallet and SafeW.
React package that is an Ergo dApp Connector. Current supported wallets are Nautilus Wallet and SafeW.

Ergo dApp Connector React Package Table of Contents About The Project Built With Getting Started Prerequisites Installation Usage Contributing License

Owner
Yoki
Yoki
CLI based on Vite to generate your project easily

CLI based on Vite to generate your project easily

Phong Nguyen 6 Jul 5, 2022
A CLI tool to clean out boilerplate code created by create-react-app

Clean React Clean React is a CLI tool that removes and modifies some of the boilerplate files and code that are being generated when initiating a new

Meike Hankewicz 15 Jun 14, 2022
This project is a template for ReactJS project. This template was built with Create React App.

This project is a template for ReactJS project. This template was built with Create React App.

99juniors 11 Apr 14, 2022
A handmade create-react-app to study how CRA works

This project was to learn how create-react-app (CRA) works under the hood, creating a very simple build project, using only the absolutely necessary.

Jéssica Félix 7 Jul 2, 2022
Create-t3-app - Interactive CLI to quickly set up an opinionated, full stack, typesafe NextJS project using the T3 Stack

create-t3-app Interactive CLI to quickly set up an opinionated, full stack, typesafe NextJS project using the T3 Stack Usage npm npx [email protected]

T3 Open Source 7.4k Sep 30, 2022
React-Typescript-Webpack was config with React, Typescript, and Webpack without CRA. Faster to start your next react project.

Start your react typescript project with manual webpack config in seconds Flexible to control webpack, easy to deploy Keywords: React Starter, Webpack

jdn97 58 Aug 9, 2022
CLI tool that makes react boilerplate component. Supports es6 or typescript, css or @emotion/styled, emmet-like syntax.

CLI tool that makes react boilerplate component. Supports es6 or typescript, css or @emotion/styled, emmet-like syntax.

Malakhov Mikhail 4 May 24, 2022
The New CLI tool explicitly for react.

Reactli (under development) The New CLI tool explicitly for react. This is a CLI tool similar to @angular/cli. The main purpose of this is, to create

Dulranga Dhawanitha 2 Jun 23, 2022
Opinionated React app boilerplate in TypeScript, based on CRA.

Marvin ⭑⭑ (deprecated) Deprecation Notice The first version of Marvin was released in 2016. After more than four years, we have taken the decision to

Work & Co 774 Sep 15, 2022
Template for developing react app with structure inspired by Ignite CLI's react native boilerplate

React Template A react template heavily inspired by Ignite CLI's boilerplate for React Native, it uses a couple of generators with simple template cus

Ibrahim Elaradi 12 Aug 18, 2022