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...

React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app built in

React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app built in

A comprehensive starter kit for rapid application development using React. Why Slingshot? One command to get started - Type npm start to start develop

Jan 3, 2023

Hi there! This is a react native starter which used to build a awesome Event Booking App based on the Figma design. You can download or clone it to speed up your projects.

Hi there! This is a react native starter which used to build a awesome Event Booking App based on the Figma design. You can download or clone it to speed up your projects.

mcrn-event-booking-app-starter Hi there! This is a react native starter which used to build a awesome Event Booking App based on the Figma design. You

Dec 19, 2022

Starter Project for Nuxt3 project with full tailwind3 implementation and also docker & docker-compose supprt

Nuxt 3 & Tailwind 3 Starter Including tailwindConfig and Tailwind Config Viewer! Be patient, this is just a Beta version of Nuxt3. For Nuxt3 Installat

Nov 10, 2022

A professional front-end template for building fast, robust, and adaptable web apps or sites.

HTML5 Boilerplate HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites. This project is t

Dec 28, 2022

DEPRECATED - A front-end template that helps you build fast, modern mobile web apps.

Deprecation Note Mobile Boilerplate is no longer maintained. Please use HTML5 Boilerplate as a decent starting point for your project. Mobile Boilerpl

Dec 14, 2022

A generic template for starting Web3 Projects

Redwood WARNING: RedwoodJS software has not reached a stable version 1.0 and should not be considered suitable for production use. In the "make it wor

Jun 28, 2022

👩🏻‍💻 Developer Ready: A comprehensive template. Works out of the box for most Node.js projects.

👩🏻‍💻 Developer Ready: A comprehensive template. Works out of the box for most Node.js projects.

node-typescript-boilerplate 👩🏻‍💻 Developer Ready: A comprehensive template. Works out of the box for most Node.js projects. 🏃🏽 Instant Value: All

Dec 15, 2022

A simple Vue3, Nuxt3 and Tailwind3 Starter Template

Nuxt 3 + Tailwind CSS 3 Starter This is a minimal starter template for Nuxt 3 projects with Tailwind CSS 3. It includes a simple template pages/index.

Feb 11, 2022

Next Boilerplate was created to be a template for starting NextJS projects with pre-configured settings like Linters, Test Setup, Storybook and Commit Hooks.

Next Boilerplate was created to be a template for starting NextJS projects with pre-configured settings like Linters, Test Setup, Storybook and Commit Hooks.

Next Boilerplate was created to be a template for starting NextJS projects with pre-configured settings like Linters, Test Setup, Storybook and Commit Hooks.

Feb 22, 2022
Owner
Yoki
Yoki
This project is for backend developers with node js. It create the "Mongoose models, routers and controllers" with cli command line.

Node.js Boilerplate This project is for backend developers with node js. It create the "Mongoose models, routers and controllers" with cli command lin

Bilal Yaver 3 Sep 19, 2022
Node Express Template (NET.ts) - a small template project which help you to speed up the process of building RESTful API

Node Express Template (NET.ts) - a small template project which help you to speed up the process of building RESTful API

Przemek Nowicki 26 Jan 4, 2023
A simple Fast CLI that create Express+Mongoose MVC pattern

express-schema-generator Site | Docs | Contributing | Code of Conduct | Twitter | Chat Bored Writing and Creating the Same Express MVC Folders Again a

Shantanu Bombatkar 10 Aug 15, 2022
React Starter Kit — isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit — "isomorphic" web app boilerplate React Starter Kit is an opinionated boilerplate for web development built on top of Node.js, Expr

Kriasoft 21.7k Jan 1, 2023
Template repo for any node.js project

App Name The project uses: ESLint для линтинга кода, используется свой styleguide основанный на airbnb стандарте. prettier для форматирования кода. hu

Konstantin Aleksandrov 1 Dec 20, 2021
An embedded app starter template with all the required stuff hooked up.

Shopify Node.js x Express.js x React.js Boilerplate An embedded app starter template to get up and ready with Shopify app development with JavaScript.

Harshdeep Singh Hura 124 Dec 25, 2022
An embedded app starter template with all the required stuff hooked up.

Shopify Node.js x Express.js x React.js Boilerplate An embedded app starter template to get up and ready with Shopify app development with JavaScript.

Harshdeep Singh Hura 47 May 25, 2022
⚡️ Set up Next.js Progressive Web App with `npx create-next-pwa`

⚡️ create-next-pwa A cross-platform Node.js based CLI tool that creates Progressive Web App (PWA) with Next.js. You can also integrate tailwind with t

Saad Irfan ⚡️ 66 Nov 20, 2022
A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)

nwb nwb is a toolkit for: Quick Development with React, Inferno, Preact or vanilla JavaScript Developing: React Apps Preact Apps Inferno Apps Vanilla

Jonny Buchanan 5.5k Jan 3, 2023
IDE and toolkit for building scalable web applications with React, Redux and React-router

An all-in-one solution for creating modern React apps Rekit is a toolkit for building scalable web applications with React, Redux and React-router. It

Rekit 4.5k Jan 2, 2023