cra-template-lyricfind-test v0.1.10
Getting Started with Create React App
This project was bootstrapped with Create React App. Use the command npx create-react-app frontend --template lyricfind
to create a LyricFind Create React App Template.
Publishing a New Version
To publish changes in this template you need the access to our private npm package account and:
1. Increase the version in the package.json
file
1. Open the terminal and go to the LyricfindCraTemplate
folder and log in the npm account using the command npm login
1. To finally publish it use the command npm publish
Testing Locally
To test a template locally, pass the file path to the directory of your template source using the file:
prefix.
npx create-react-app my-app --template file:../path/to/your/template
Create React App Template Folder Structure
A template must have the following structure:
cra-template-[template-name]/
README.md (for npm)
template.json
package.json
template/
README.md (for projects created from this template)
gitignore
public/
index.html
src/
index.js (or index.tsx)
The template
folder
This folder is copied to the user's app directory as Create React App installs. During this process, the file gitignore
is renamed to .gitignore
.
We can add whatever files we want in here, but we must have at least the files specified above.
The template.json
file
This is the configuration file to our template. The package
key let us provide any keys/values that we want added to the generated project's package.json
.
Any values add for "dependencies"
and "scripts"
will be merged with the Create React App defaults.