publish:clean: removes the files from the template folder
publish:copy: copy the files from the project into the template folder
publish:prepare: updates the /template folder for publishing into npm.
Dependency
N/A
Testing
There are 2 main things to test:
CRA Template for New Projects:
You can do that by:
--- open the terminal;
--- go to a random folder you want;
--- npx create-react-app blablabl --template ui5-webcomponents-react-seed;
--- cd into blablabl;
--- run yarn install;
--- run yarn test:ci;
This will create a new react project with our seed files already configured for you.
CRA Template Engine
You can do that by:
--- npm run publish:clean: This will remove almost all files at /template folder.
--- npm run publish:copy: This will copy all the files from the root project into the /template folder.
--- npm run publish:prepare: This should be executed before running npm publish for new features.
Automated Tests
[ ] Select this if your code has automated Tests for it.
Description
This PR adds the CRA-Template support.
It also includes 3 new scripts:
publish:clean
: removes the files from thetemplate
folderpublish:copy
: copy the files from the project into thetemplate
folderpublish:prepare
: updates the/template
folder for publishing intonpm
.Dependency
N/A
Testing
There are 2 main things to test:
CRA Template for New Projects:
npx create-react-app blablabl --template ui5-webcomponents-react-seed
; --- cd intoblablabl
; --- runyarn install
; --- runyarn test:ci
;This will create a new react project with our seed files already configured for you.
CRA Template Engine
npm run publish:clean
: This will remove almost all files at/template
folder. ---npm run publish:copy
: This will copy all the files from the root project into the/template
folder. ---npm run publish:prepare
: This should be executed before runningnpm publish
for new features.Automated Tests
References
23
https://medium.com/@alexgrischuk/how-to-create-custom-create-react-app-cra-templates-73a5196edeb
https://www.npmjs.com/package/cra-template-ui5-webcomponents-react-seed