@oss-ma/tpl 1.0.25 → 1.0.27
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/package.json +1 -1
- package/resources/templates/react-ts/template.yaml +3 -36
- package/resources/templates/react-ts/files/src/app/App.js +0 -7
- package/resources/templates/react-ts/files/src/app/main.js +0 -6
- package/resources/templates/react-ts/files/src/features/example/Example.js +0 -10
- package/resources/templates/react-ts/files/src/shared/ui/Button.js +0 -10
package/package.json
CHANGED
|
@@ -17,44 +17,11 @@ hooks:
|
|
|
17
17
|
postGenerate:
|
|
18
18
|
- run: "git init"
|
|
19
19
|
|
|
20
|
-
# npm — frozen install, no scripts
|
|
21
20
|
- run: "npm install --ignore-scripts"
|
|
22
21
|
when: "{{packageManager}} == npm"
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
- run: "pnpm install --frozen-lockfile --ignore-scripts"
|
|
23
|
+
- run: "pnpm install --ignore-scripts"
|
|
26
24
|
when: "{{packageManager}} == pnpm"
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
when: "{{packageManager}} == yarn"
|
|
31
|
-
|
|
32
|
-
# Run tests after install (safe — no scripts flag only applies to lifecycle scripts)
|
|
33
|
-
- run: "npm run test"
|
|
34
|
-
when: "{{packageManager}} == npm"
|
|
35
|
-
|
|
36
|
-
- run: "pnpm run test"
|
|
37
|
-
when: "{{packageManager}} == pnpm"
|
|
38
|
-
|
|
39
|
-
- run: "yarn test"
|
|
40
|
-
when: "{{packageManager}} == yarn"
|
|
41
|
-
# name: react-ts
|
|
42
|
-
# version: 1.0.0
|
|
43
|
-
# description: "Template React + TypeScript (Vite) with lint/format/test/build + CI + ADR"
|
|
44
|
-
# engine: "v1"
|
|
45
|
-
|
|
46
|
-
# questions:
|
|
47
|
-
# - name: appName
|
|
48
|
-
# message: "Nom du projet ?"
|
|
49
|
-
# default: "my-react-app"
|
|
50
|
-
|
|
51
|
-
# - name: packageManager
|
|
52
|
-
# message: "Package manager ?"
|
|
53
|
-
# choices: ["npm", "pnpm", "yarn"]
|
|
54
|
-
# default: "npm"
|
|
55
|
-
|
|
56
|
-
# hooks:
|
|
57
|
-
# postGenerate:
|
|
58
|
-
# - run: "git init"
|
|
59
|
-
# - run: "{{packageManager}} ci --ignore-scripts" # npm
|
|
60
|
-
# - run: "{{packageManager}} run test"
|
|
26
|
+
- run: "yarn install --ignore-scripts"
|
|
27
|
+
when: "{{packageManager}} == yarn"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
|
-
import { Button } from "../../shared/ui/Button.js";
|
|
3
|
-
export function Example() {
|
|
4
|
-
const [msg, setMsg] = useState(null);
|
|
5
|
-
return (<section style={{ marginTop: 16 }}>
|
|
6
|
-
<p>Feature module example.</p>
|
|
7
|
-
<Button onClick={() => setMsg("Hello!")}>Click</Button>
|
|
8
|
-
{msg && <p style={{ marginTop: 8 }}>{msg}</p>}
|
|
9
|
-
</section>);
|
|
10
|
-
}
|