Skip to content

Commit da5280c

Browse files
LuisValgoiMarcusNotheis
authored andcommitted
Merge pull request #43 from LuisValgoi/issue-23
[ISSUE-23] CRA Template
1 parent a1fbea2 commit da5280c

File tree

5 files changed

+221
-75
lines changed

5 files changed

+221
-75
lines changed

packages/ui5-webcomponents-react-seed/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
# Description
2-
The goal of this repository is to increase the boostrap time spent on a new project with several things already set.
2+
3+
The goal of this repository is to increase the boostrap time spent on a new project with the React + UI5WebComponentsReact with several things already set.
34

45
# Wanna Help?
56

67
Take a look into our Kanban Board [here](https://github.com/LuisValgoi/ui5-webcomponents-react-seed/projects/1?fullscreen=true).
78

9+
# Usage
10+
11+
- `cd your-development-folder`
12+
- `npx create-react-app your-project-name --template ui5-webcomponents-react-seed`
13+
- `npm install`
14+
- have fun with the other scripts :)
15+
16+
PS.: It is important to add the `--template ui5-webcomponents-react-seed` at the end to get our template.
17+
818
# Getting Started
919

1020
- `yarn install`: To install this project dependencies.

packages/ui5-webcomponents-react-seed/package.json

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,35 @@
11
{
2-
"name": "ui5-webcomponents-react-seed",
3-
"version": "0.1.0",
4-
"private": true,
2+
"name": "cra-template-ui5-webcomponents-react-seed",
3+
"version": "1.0.0",
4+
"license": "MIT",
5+
"author": {
6+
"name": "Luis Valgoi",
7+
"email": "[email protected]"
8+
},
9+
"engines": {
10+
"node": ">=10"
11+
},
12+
"main": "template.json",
13+
"description": "A Seed of UI5 Web Components for React",
14+
"keywords": [
15+
"react",
16+
"create-react-app",
17+
"template",
18+
"ui5-webcomponents-react",
19+
"ui5-webcomponents-react-seed"
20+
],
21+
"files": [
22+
"template",
23+
"template.json"
24+
],
25+
"publishConfig": {
26+
"tag": "latest",
27+
"access": "public"
28+
},
529
"dependencies": {
30+
"@babel/plugin-proposal-class-properties": "^7.10.4",
31+
"@commitlint/cli": "^9.1.2",
32+
"@commitlint/config-conventional": "^9.1.2",
633
"@testing-library/jest-dom": "^5.11.4",
734
"@testing-library/react": "^10.4.9",
835
"@testing-library/user-event": "^12.1.3",
@@ -12,14 +39,20 @@
1239
"@ui5/webcomponents-icons": "1.0.0-rc.8",
1340
"@ui5/webcomponents-react": "^0.10.0",
1441
"axios": "^0.20.0",
42+
"env-cmd": "^10.1.0",
43+
"husky": "^4.2.5",
1544
"i18next": "^19.7.0",
1645
"i18next-browser-languagedetector": "^6.0.1",
1746
"jest-environment-jsdom-sixteen": "^1.0.3",
1847
"msw": "^0.20.5",
48+
"nodemon": "^2.0.4",
49+
"npm-run-all": "^4.1.5",
1950
"react": "^16.13.1",
51+
"react-app-polyfill": "^1.0.6",
2052
"react-dom": "^16.13.1",
2153
"react-helmet": "^6.1.0",
2254
"react-i18next": "^11.7.2",
55+
"react-query": "^2.12.1",
2356
"react-router-dom": "^5.2.0",
2457
"react-scripts": "3.4.3"
2558
},
@@ -34,7 +67,10 @@
3467
"test:ci": "npm run test -- --watchAll=false",
3568
"test:coverage": "npm run test -- --watchAll=false --coverage",
3669
"eject": "react-scripts eject",
37-
"commit:pre": "npm-run-all --parallel test:ci lint"
70+
"commit:pre": "npm-run-all --parallel test:ci lint",
71+
"publish:clean": "rm -rf ./template/src ./template/server ./template/.vscode ./template/public && rm -f ./template/.editorconfig ./template/.env ./template/.eslintignore ./template/.eslintrc.js ./template/commitlint.config.js ./template/PULL_REQUEST_TEMPLATE.md ./template/README.md ./template/webpack.config.js",
72+
"publish:copy": "cp -a ./src/. template/src && cp -a ./server/. template/server && cp -a ./.vscode/. template/.vscode && cp -a ./public/. template/public && cp .editorconfig .env .eslintignore .eslintrc.js commitlint.config.js PULL_REQUEST_TEMPLATE.md README.md webpack.config.js template/",
73+
"publish:prepare": "npm-run-all publish:clean publish:copy"
3874
},
3975
"browserslist": {
4076
"production": [
@@ -60,16 +96,5 @@
6096
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
6197
"prepare-commit-msg": "exec < /dev/tty && true"
6298
}
63-
},
64-
"devDependencies": {
65-
"@babel/plugin-proposal-class-properties": "^7.10.4",
66-
"@commitlint/cli": "^9.1.2",
67-
"@commitlint/config-conventional": "^9.1.2",
68-
"env-cmd": "^10.1.0",
69-
"husky": "^4.2.5",
70-
"nodemon": "^2.0.4",
71-
"npm-run-all": "^4.1.5",
72-
"react-app-polyfill": "^1.0.6",
73-
"react-query": "^2.12.1"
7499
}
75100
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"package": {
3+
"dependencies": {
4+
"@babel/plugin-proposal-class-properties": "^7.10.4",
5+
"@commitlint/cli": "^9.1.2",
6+
"@commitlint/config-conventional": "^9.1.2",
7+
"@testing-library/jest-dom": "^5.11.4",
8+
"@testing-library/react": "^10.4.9",
9+
"@testing-library/user-event": "^12.1.3",
10+
"@types/jest": "^26.0.10",
11+
"@ui5/webcomponents": "1.0.0-rc.8",
12+
"@ui5/webcomponents-fiori": "1.0.0-rc.8",
13+
"@ui5/webcomponents-icons": "1.0.0-rc.8",
14+
"@ui5/webcomponents-react": "^0.10.0",
15+
"axios": "^0.20.0",
16+
"env-cmd": "^10.1.0",
17+
"husky": "^4.2.5",
18+
"i18next": "^19.7.0",
19+
"i18next-browser-languagedetector": "^6.0.1",
20+
"jest-environment-jsdom-sixteen": "^1.0.3",
21+
"msw": "^0.20.5",
22+
"nodemon": "^2.0.4",
23+
"npm-run-all": "^4.1.5",
24+
"react": "^16.13.1",
25+
"react-app-polyfill": "^1.0.6",
26+
"react-dom": "^16.13.1",
27+
"react-helmet": "^6.1.0",
28+
"react-i18next": "^11.7.2",
29+
"react-query": "^2.12.1",
30+
"react-router-dom": "^5.2.0",
31+
"react-scripts": "3.4.3"
32+
},
33+
"scripts": {
34+
"start:react": "react-scripts start",
35+
"start:mock": "nodemon --watch server/data --exec json-server --p 3001 server/mockserver.js --routes server/routes.json",
36+
"start": "env-cmd -f .env npm-run-all --parallel start:react",
37+
"mock": "env-cmd -f .env npm-run-all --parallel start:mock start:react",
38+
"build": "react-scripts build",
39+
"lint": "eslint --quiet .",
40+
"test": "react-scripts test --silent --env=jest-environment-jsdom-sixteen",
41+
"test:ci": "npm run test -- --watchAll=false",
42+
"test:coverage": "npm run test -- --watchAll=false --coverage",
43+
"eject": "react-scripts eject",
44+
"commit:pre": "npm-run-all --parallel test:ci lint",
45+
"publish:clean": "rm -rf ./template/src ./template/server ./template/.vscode ./template/public && rm -f ./template/.editorconfig ./template/.env ./template/.eslintignore ./template/.eslintrc.js ./template/commitlint.config.js ./template/PULL_REQUEST_TEMPLATE.md ./template/README.md ./template/webpack.config.js",
46+
"publish:copy": "cp -a ./src/. template/src && cp -a ./server/. template/server && cp -a ./.vscode/. template/.vscode && cp -a ./public/. template/public && cp .editorconfig .env .eslintignore .eslintrc.js commitlint.config.js PULL_REQUEST_TEMPLATE.md README.md webpack.config.js template/",
47+
"publish:prepare": "npm-run-all publish:clean publish:copy"
48+
},
49+
"browserslist": {
50+
"production": [
51+
">0.2%",
52+
"not dead",
53+
"not op_mini all"
54+
],
55+
"development": [
56+
"last 1 chrome version",
57+
"last 1 firefox version",
58+
"last 1 safari version",
59+
"ie 11"
60+
]
61+
},
62+
"jest": {
63+
"transformIgnorePatterns": [
64+
"node_modules/(?!(@ui5|lit-html)).*\\.js$"
65+
]
66+
},
67+
"husky": {
68+
"hooks": {
69+
"pre-commit": "npm run commit:pre",
70+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
71+
"prepare-commit-msg": "exec < /dev/tty && true"
72+
}
73+
}
74+
}
75+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

0 commit comments

Comments
 (0)