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...
The New CLI tool explicitly for react.
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

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

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

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

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

Owner
Yoki
Yoki
A CLI tool for quickly creating my own Vue3 template and React18-template

vgt Description A CLI tool for quickly creating my own Vue3 template and React18-template. ?? I build it just for fun, it is still in progress. ?? And

Cupid Valentine 4 Nov 12, 2022
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 1 Dec 23, 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
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
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 61 Jan 5, 2023
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 create-t3-app@lat

T3 Open Source 12.5k Jan 2, 2023
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 773 Nov 8, 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