create-chayns-app 1.1.27 → 1.2.0-beta.0

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.
Files changed (44) hide show
  1. package/dist/index.cjs +126 -0
  2. package/package.json +23 -15
  3. package/templates/api-v5/page/src/components/AppWrapper.jsx +7 -9
  4. package/templates/api-v5/page/src/index.html +1 -1
  5. package/templates/api-v5/page/src/index.jsx +1 -1
  6. package/templates/api-v5/page-module/src/components/App.jsx +19 -16
  7. package/templates/api-v5/page-module/src/components/AppWrapper.jsx +10 -12
  8. package/templates/api-v5/page-module-redux/src/components/App.jsx +20 -14
  9. package/templates/api-v5/page-module-redux/src/components/AppWrapper.jsx +7 -7
  10. package/templates/api-v5/page-redux/src/components/AppWrapper.jsx +9 -11
  11. package/templates/api-v5/page-redux/src/index.html +1 -1
  12. package/templates/api-v5/page-redux/src/index.jsx +1 -1
  13. package/templates/api-v5/page-ts/src/components/AppWrapper.tsx +7 -9
  14. package/templates/api-v5/page-ts/src/index.html +1 -1
  15. package/templates/api-v5/page-ts/src/index.tsx +1 -1
  16. package/templates/api-v5/page-ts-module/src/components/App.tsx +17 -14
  17. package/templates/api-v5/page-ts-module/src/components/AppWrapper.tsx +7 -7
  18. package/templates/api-v5/page-ts-module-redux/src/components/App.tsx +21 -14
  19. package/templates/api-v5/page-ts-module-redux/src/components/AppWrapper.tsx +13 -9
  20. package/templates/api-v5/page-ts-redux/src/components/AppWrapper.tsx +9 -11
  21. package/templates/api-v5/page-ts-redux/src/index.html +1 -1
  22. package/templates/api-v5/page-ts-redux/src/index.tsx +0 -1
  23. package/templates/api-v5/shared/.env.development.local +0 -2
  24. package/templates/api-v5/shared/js/src/constants/server-urls.js +0 -1
  25. package/templates/api-v5/shared/js/src/redux-modules/index.js +1 -1
  26. package/templates/api-v5/shared/toolkit.config-module.js +7 -3
  27. package/templates/api-v5/shared/toolkit.config.js +6 -4
  28. package/templates/api-v5/shared/ts/src/constants/server-urls.ts +0 -1
  29. package/templates/api-v5/shared/ts/src/redux-modules/index.ts +1 -1
  30. package/templates/api-v5/shared/ts/src/types/environment.d.ts +2 -2
  31. package/templates/api-v5/shared/ts/src/types/global.d.ts +5 -0
  32. package/templates/api-v5/shared/ts/tsconfig.json +17 -19
  33. package/templates/page/README.md +5 -8
  34. package/templates/page/src/index.html +1 -1
  35. package/templates/shared/README.md +5 -8
  36. package/templates/shared/tests/setup.js +9 -0
  37. package/templates/shared/vitest.config.mjs +18 -0
  38. package/.github/workflows/publish.yml +0 -21
  39. package/dist/index.js +0 -40
  40. package/templates/api-v5/shared/js/template-package-redux.json +0 -40
  41. package/templates/api-v5/shared/js/template-package.json +0 -38
  42. package/templates/api-v5/shared/ts/template-package-redux.json +0 -39
  43. package/templates/api-v5/shared/ts/template-package.json +0 -37
  44. package/templates/page/template-package.json +0 -33
@@ -12,3 +12,8 @@ declare module '*.svg?url' {
12
12
  const value: string;
13
13
  export = value;
14
14
  }
15
+
16
+ declare module '*.json' {
17
+ const value: any;
18
+ export default value;
19
+ }
@@ -1,21 +1,19 @@
1
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
- }
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": ["DOM", "ESNext"],
12
+ "moduleResolution": "Node",
13
+ "target": "ES2020",
14
+ "noEmit": true,
15
+ "resolveJsonModule": true,
16
+ "skipLibCheck": true,
17
+ "strict": true
18
+ }
21
19
  }
@@ -13,8 +13,7 @@
13
13
 
14
14
  ## Get Started
15
15
 
16
- To get started with working on the project first you have to install its
17
- dependencies:
16
+ To get started with working on the project first you have to install its dependencies:
18
17
 
19
18
  ```bash
20
19
  {{ install-command }}
@@ -24,16 +23,15 @@ Then you will have the following commands available:
24
23
 
25
24
  ### `{{ run-command }} dev`
26
25
 
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
26
+ This starts the project with a local server for development. Typically this will be on
27
+ [`http://localhost:1234/`](http://localhost:1234/), but this
29
28
  [can be adjusted](https://github.com/TobitSoftware/chayns-toolkit#development-options).
30
29
 
31
30
  ### `{{ run-command }} build`
32
31
 
33
32
  This builds your project for production.
34
33
 
35
- > If you want to analyze your bundle size you can do so by passing the `-a` flag
36
- > to this command.
34
+ > If you want to analyze your bundle size you can do so by passing the `-a` flag to this command.
37
35
 
38
36
  ### `{{ run-command }} lint`
39
37
 
@@ -45,7 +43,6 @@ Automatically formats all of the source code in your project.
45
43
 
46
44
  ---
47
45
 
48
- This project is based on
49
- [`chayns-toolkit`](https://github.com/TobitSoftware/chayns-toolkit). If you
46
+ This project is based on [`chayns-toolkit`](https://github.com/TobitSoftware/chayns-toolkit). If you
50
47
  encounter any issues with the toolchain and the commands, please
51
48
  [open an issue](https://github.com/TobitSoftware/chayns-toolkit/issues/new).
@@ -9,7 +9,7 @@
9
9
  <title>{{ readable-package-name }}</title>
10
10
  </head>
11
11
  <body>
12
- <div class="tapp" id="root" {{ tapp-style }}></div>
12
+ <div class="tapp" id="root"{{ tapp-style }}></div>
13
13
  <script src="https://api.chayns-static.space/js/v4.0/chayns.min.js"></script>
14
14
  </body>
15
15
  </html>
@@ -13,8 +13,7 @@
13
13
 
14
14
  ## Get Started
15
15
 
16
- To get started with working on the project first you have to install its
17
- dependencies:
16
+ To get started with working on the project first you have to install its dependencies:
18
17
 
19
18
  ```bash
20
19
  {{ install-command }}
@@ -24,16 +23,15 @@ Then you will have the following commands available:
24
23
 
25
24
  ### `{{ run-command }} dev`
26
25
 
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
26
+ This starts the project with a local server for development. Typically this will be on
27
+ [`http://localhost:1234/`](http://localhost:1234/), but this
29
28
  [can be adjusted](https://github.com/TobitSoftware/chayns-toolkit#development-options).
30
29
 
31
30
  ### `{{ run-command }} build`
32
31
 
33
32
  This builds your project for production.
34
33
 
35
- > If you want to analyze your bundle size you can do so by passing the `-a` flag
36
- > to this command.
34
+ > If you want to analyze your bundle size you can do so by passing the `-a` flag to this command.
37
35
 
38
36
  ### `{{ run-command }} lint`
39
37
 
@@ -45,7 +43,6 @@ Automatically formats all of the source code in your project.
45
43
 
46
44
  ---
47
45
 
48
- This project is based on
49
- [`chayns-toolkit`](https://github.com/TobitSoftware/chayns-toolkit). If you
46
+ This project is based on [`chayns-toolkit`](https://github.com/TobitSoftware/chayns-toolkit). If you
50
47
  encounter any issues with the toolchain and the commands, please
51
48
  [open an issue](https://github.com/TobitSoftware/chayns-toolkit/issues/new).
@@ -0,0 +1,9 @@
1
+ import { expect, afterEach } from 'vitest';
2
+ import { cleanup } from '@testing-library/react';
3
+ import * as matchers from '@testing-library/jest-dom/matchers';
4
+
5
+ expect.extend(matchers);
6
+
7
+ afterEach(() => {
8
+ cleanup();
9
+ });
@@ -0,0 +1,18 @@
1
+ import { defineConfig } from 'vitest/config';
2
+ import react from '@vitejs/plugin-react';
3
+
4
+ export default defineConfig({
5
+ plugins: [react()],
6
+ test: {
7
+ globals: true,
8
+ environment: 'jsdom',
9
+ setupFiles: './tests/setup.js',
10
+ coverage: {
11
+ enabled: true,
12
+ provider: 'v8',
13
+ reporter: ['text', 'json', 'html'],
14
+ include: ['src/**'],
15
+ all: true,
16
+ },
17
+ },
18
+ });
@@ -1,21 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- workflow_dispatch:
5
- push:
6
- tags:
7
- - 'v*'
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v2
14
- - uses: actions/setup-node@v1
15
- with:
16
- node-version: '20'
17
- registry-url: https://registry.npmjs.org/
18
- - run: npm ci
19
- - run: npm publish
20
- env:
21
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}