create-chayns-app 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +2 -2
- package/dist/index.js +8 -8
- package/package.json +14 -12
- package/templates/api-v5/page/src/components/App.jsx +9 -0
- package/templates/api-v5/page/src/index.html +19 -0
- package/templates/api-v5/page/src/index.jsx +17 -0
- package/templates/api-v5/page-module/src/components/App.jsx +30 -0
- package/templates/api-v5/page-module/src/components/AppWrapper.jsx +16 -0
- package/templates/api-v5/page-module/src/components/app.scss +3 -0
- package/templates/api-v5/page-module-redux/src/components/App.jsx +32 -0
- package/templates/api-v5/page-module-redux/src/components/AppWrapper.jsx +20 -0
- package/templates/api-v5/page-module-redux/src/components/app.scss +3 -0
- package/templates/api-v5/page-redux/src/components/App.jsx +7 -0
- package/templates/api-v5/page-redux/src/components/AppWrapper.jsx +17 -0
- package/templates/api-v5/page-redux/src/index.html +19 -0
- package/templates/api-v5/page-redux/src/index.jsx +15 -0
- package/templates/api-v5/page-ts/src/components/App.tsx +7 -0
- package/templates/api-v5/page-ts/src/index.html +19 -0
- package/templates/api-v5/page-ts/src/index.tsx +16 -0
- package/templates/api-v5/page-ts-module/src/components/App.tsx +30 -0
- package/templates/api-v5/page-ts-module/src/components/AppWrapper.tsx +16 -0
- package/templates/api-v5/page-ts-module/src/components/app.scss +3 -0
- package/templates/api-v5/page-ts-module-redux/src/components/App.tsx +31 -0
- package/templates/api-v5/page-ts-module-redux/src/components/AppWrapper.tsx +16 -0
- package/templates/api-v5/page-ts-module-redux/src/components/app.scss +3 -0
- package/templates/api-v5/page-ts-redux/src/components/App.tsx +7 -0
- package/templates/api-v5/page-ts-redux/src/components/AppWrapper.tsx +17 -0
- package/templates/api-v5/page-ts-redux/src/index.html +19 -0
- package/templates/api-v5/page-ts-redux/src/index.tsx +15 -0
- package/templates/api-v5/shared/js/src/redux-modules/counter/counterSelectors.js +3 -0
- package/templates/api-v5/shared/js/src/redux-modules/counter/counterSlice.js +23 -0
- package/templates/api-v5/shared/js/src/redux-modules/index.js +11 -0
- package/templates/api-v5/shared/js/template-package-redux.json +36 -0
- package/templates/api-v5/shared/js/template-package.json +34 -0
- package/templates/api-v5/shared/toolkit.config-module.js +9 -0
- package/templates/api-v5/shared/toolkit.config.js +5 -0
- package/templates/api-v5/shared/ts/src/redux-modules/counter/counterSelectors.ts +4 -0
- package/templates/api-v5/shared/ts/src/redux-modules/counter/counterSlice.ts +23 -0
- package/templates/api-v5/shared/ts/src/redux-modules/index.ts +14 -0
- package/templates/api-v5/shared/ts/template-package-redux.json +39 -0
- package/templates/api-v5/shared/ts/template-package.json +37 -0
- package/templates/api-v5/shared/ts/tsconfig.json +21 -0
- package/templates/page/src/index.html +1 -4
- package/templates/page/template-package.json +6 -5
- package/templates/shared/README.md +51 -0
- package/templates/shared/template-gitignore +31 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { configureStore, combineReducers } from '@reduxjs/toolkit';
|
|
2
|
+
import { counterReducer } from "./counter/counterSlice";
|
|
3
|
+
|
|
4
|
+
const rootReducer = combineReducers({
|
|
5
|
+
counter: counterReducer
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const Store = configureStore({
|
|
9
|
+
reducer: rootReducer,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type RootState = ReturnType<typeof rootReducer>;
|
|
13
|
+
export type AppDispatch = typeof Store.dispatch;
|
|
14
|
+
export default Store;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{ package-name }}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "{{ description }}",
|
|
6
|
+
"keywords": ["chayns", "chayns-toolkit", "react"],
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "chayns-toolkit build",
|
|
9
|
+
"dev": "chayns-toolkit dev",
|
|
10
|
+
"start": "chayns-toolkit dev",
|
|
11
|
+
"format": "prettier . --write",
|
|
12
|
+
"lint": "chayns-toolkit lint"
|
|
13
|
+
},
|
|
14
|
+
"prettier": {
|
|
15
|
+
"proseWrap": "always",
|
|
16
|
+
"singleQuote": true,
|
|
17
|
+
"tabWidth": 4
|
|
18
|
+
},
|
|
19
|
+
"eslintConfig": {
|
|
20
|
+
"extends": "@chayns-toolkit"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"chayns-components": "^4.24.25",
|
|
24
|
+
"prop-types": "^15.8.1",
|
|
25
|
+
"react": "^17.0.2",
|
|
26
|
+
"react-dom": "^17.0.2",
|
|
27
|
+
"chayns-api": "^1.0.0",
|
|
28
|
+
"react-redux": "^8.0.4",
|
|
29
|
+
"@reduxjs/toolkit": "^1.8.6"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"chayns-toolkit": "^2.0.0-beta.26",
|
|
33
|
+
"prettier": "^2.7.1",
|
|
34
|
+
"prettier-plugin-packagejson": "^2.3.0",
|
|
35
|
+
"typescript": "^4.8.4",
|
|
36
|
+
"@types/react": "17.0.52",
|
|
37
|
+
"@types/react-dom": "17.0.18"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{ package-name }}",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "{{ description }}",
|
|
6
|
+
"keywords": ["chayns", "chayns-toolkit", "react"],
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "chayns-toolkit build",
|
|
9
|
+
"dev": "chayns-toolkit dev",
|
|
10
|
+
"start": "chayns-toolkit dev",
|
|
11
|
+
"format": "prettier . --write",
|
|
12
|
+
"lint": "chayns-toolkit lint"
|
|
13
|
+
},
|
|
14
|
+
"prettier": {
|
|
15
|
+
"proseWrap": "always",
|
|
16
|
+
"singleQuote": true,
|
|
17
|
+
"tabWidth": 4
|
|
18
|
+
},
|
|
19
|
+
"eslintConfig": {
|
|
20
|
+
"extends": "@chayns-toolkit"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"chayns-components": "^4.24.25",
|
|
24
|
+
"prop-types": "^15.8.1",
|
|
25
|
+
"react": "^17.0.2",
|
|
26
|
+
"react-dom": "^17.0.2",
|
|
27
|
+
"chayns-api": "^1.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"chayns-toolkit": "^2.0.0-beta.26",
|
|
31
|
+
"prettier": "^2.7.1",
|
|
32
|
+
"prettier-plugin-packagejson": "^2.3.0",
|
|
33
|
+
"typescript": "^4.8.4",
|
|
34
|
+
"@types/react": "17.0.52",
|
|
35
|
+
"@types/react-dom": "17.0.18"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
"allowSyntheticDefaultImports": true,
|
|
5
|
+
"baseUrl": "src",
|
|
6
|
+
"checkJs": false,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"jsx": "react",
|
|
11
|
+
"lib": [
|
|
12
|
+
"DOM",
|
|
13
|
+
"ESNext"
|
|
14
|
+
],
|
|
15
|
+
"moduleResolution": "Node",
|
|
16
|
+
"target": "ES2020",
|
|
17
|
+
"noEmit": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"strict": true
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
/>
|
|
9
9
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
src="https://api.chayns-static.space/css/v4/compatibility/compatibility.min.js"
|
|
13
|
-
version="4.2"
|
|
14
|
-
></script>
|
|
11
|
+
<%= CHAYNS_TOOLKIT_CSS_TAG %>
|
|
15
12
|
|
|
16
13
|
<title>{{ readable-package-name }}</title>
|
|
17
14
|
</head>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "chayns-toolkit build",
|
|
9
9
|
"dev": "chayns-toolkit dev",
|
|
10
|
+
"start": "chayns-toolkit dev",
|
|
10
11
|
"format": "prettier . --write",
|
|
11
12
|
"lint": "chayns-toolkit lint"
|
|
12
13
|
},
|
|
@@ -19,14 +20,14 @@
|
|
|
19
20
|
"extends": "@chayns-toolkit"
|
|
20
21
|
},
|
|
21
22
|
"dependencies": {
|
|
22
|
-
"chayns-components": "^4.
|
|
23
|
-
"prop-types": "^15.
|
|
23
|
+
"chayns-components": "^4.24.25",
|
|
24
|
+
"prop-types": "^15.8.1",
|
|
24
25
|
"react": "^17.0.2",
|
|
25
26
|
"react-dom": "^17.0.2"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"chayns-toolkit": "^
|
|
29
|
-
"prettier": "^2.
|
|
30
|
-
"prettier-plugin-packagejson": "^2.
|
|
29
|
+
"chayns-toolkit": "^2.0.0-beta.26",
|
|
30
|
+
"prettier": "^2.7.1",
|
|
31
|
+
"prettier-plugin-packagejson": "^2.3.0"
|
|
31
32
|
}
|
|
32
33
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>{{ package-name }}</h1>
|
|
3
|
+
<p>{{ description }}</p>
|
|
4
|
+
<a href="https://github.com/TobitSoftware/chayns-toolkit">
|
|
5
|
+
<img
|
|
6
|
+
alt="Managed with chayns-toolkit"
|
|
7
|
+
src="https://img.shields.io/badge/managed%20with-chayns--toolkit-%23000?style=for-the-badge"
|
|
8
|
+
/>
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Get Started
|
|
15
|
+
|
|
16
|
+
To get started with working on the project first you have to install its
|
|
17
|
+
dependencies:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
{{ install-command }}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then you will have the following commands available:
|
|
24
|
+
|
|
25
|
+
### `{{ run-command }} dev`
|
|
26
|
+
|
|
27
|
+
This starts the project with a local server for development. Typically this will
|
|
28
|
+
be on [`http://localhost:1234/`](http://localhost:1234/), but this
|
|
29
|
+
[can be adjusted](https://github.com/TobitSoftware/chayns-toolkit#development-options).
|
|
30
|
+
|
|
31
|
+
### `{{ run-command }} build`
|
|
32
|
+
|
|
33
|
+
This builds your project for production.
|
|
34
|
+
|
|
35
|
+
> If you want to analyze your bundle size you can do so by passing the `-a` flag
|
|
36
|
+
> to this command.
|
|
37
|
+
|
|
38
|
+
### `{{ run-command }} lint`
|
|
39
|
+
|
|
40
|
+
Checks your project for errors and code quality.
|
|
41
|
+
|
|
42
|
+
### `{{ run-command }} format`
|
|
43
|
+
|
|
44
|
+
Automatically formats all of the source code in your project.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
This project is based on
|
|
49
|
+
[`chayns-toolkit`](https://github.com/TobitSoftware/chayns-toolkit). If you
|
|
50
|
+
encounter any issues with the toolchain and the commands, please
|
|
51
|
+
[open an issue](https://github.com/TobitSoftware/chayns-toolkit/issues/new).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.cache
|
|
2
|
+
.cache/
|
|
3
|
+
.env
|
|
4
|
+
.env.test
|
|
5
|
+
.env*.local
|
|
6
|
+
.eslintcache
|
|
7
|
+
.fusebox/
|
|
8
|
+
.idea/
|
|
9
|
+
.node_repl_history
|
|
10
|
+
.npm
|
|
11
|
+
.vscode-test
|
|
12
|
+
.vscode/
|
|
13
|
+
.yarn-integrity
|
|
14
|
+
*.code-workspace
|
|
15
|
+
*.iws
|
|
16
|
+
*.lcov
|
|
17
|
+
*.log
|
|
18
|
+
*.pid
|
|
19
|
+
*.pid.lock
|
|
20
|
+
*.seed
|
|
21
|
+
*.tgz
|
|
22
|
+
*.tsbuildinfo
|
|
23
|
+
build/
|
|
24
|
+
coverage
|
|
25
|
+
dist
|
|
26
|
+
lib-cov
|
|
27
|
+
logs
|
|
28
|
+
node_modules/
|
|
29
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
30
|
+
yarn-debug.log*
|
|
31
|
+
yarn-error.log*
|