create-zephyr-apps 0.0.5 → 0.0.7
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/dist/index.cjs +28 -7
- package/dist/index.mjs +28 -7
- package/package/index.ts +2 -1
- package/package/utils/end.ts +26 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -36,20 +36,40 @@ const external_child_process_namespaceObject = require("child_process");
|
|
|
36
36
|
const prompts_namespaceObject = require("@clack/prompts");
|
|
37
37
|
function end_note({ project }) {
|
|
38
38
|
try {
|
|
39
|
-
(0, external_child_process_namespaceObject.exec)(
|
|
40
|
-
console.log(stdout);
|
|
39
|
+
(0, external_child_process_namespaceObject.exec)("git config user.name", (err, stdout, stderr)=>{
|
|
41
40
|
const user_name = stdout.toString().trim();
|
|
42
41
|
const repo_name = project.path.split('/').pop();
|
|
43
42
|
let next_steps;
|
|
44
|
-
next_steps = 'web' === project.type ?
|
|
45
|
-
|
|
43
|
+
next_steps = 'web' === project.type ? [
|
|
44
|
+
`cd ${repo_name}`,
|
|
45
|
+
"pnpm install",
|
|
46
|
+
"rm -rf .git",
|
|
47
|
+
"git init",
|
|
48
|
+
`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`,
|
|
49
|
+
"git add .",
|
|
50
|
+
'git commit -m "Initial commit"',
|
|
51
|
+
"pnpm run build"
|
|
52
|
+
] : [
|
|
53
|
+
`cd ${repo_name}`,
|
|
54
|
+
"pnpm install",
|
|
55
|
+
"rm -rf .git",
|
|
56
|
+
"git init",
|
|
57
|
+
external_chalk_default().magenta(`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`),
|
|
58
|
+
"git add .",
|
|
59
|
+
'git commit -m "Initial commit"',
|
|
60
|
+
"ZC=1 pnpm run start",
|
|
61
|
+
`\n--------------------------------\n`,
|
|
62
|
+
"Make your first commit and link it to the remote repository!",
|
|
63
|
+
`Read more about how Module Federation works with Zephyr and why steps above are required: ${external_chalk_default().underline(external_chalk_default().cyan('https://docs.zephyr-cloud.io/how-to/mf-guide'))}`
|
|
64
|
+
];
|
|
65
|
+
(0, prompts_namespaceObject.note)(external_chalk_default().cyan(next_steps.join('\n')), 'Next steps.');
|
|
46
66
|
});
|
|
47
67
|
} catch (error) {
|
|
48
68
|
console.error(error);
|
|
49
69
|
} finally{
|
|
50
70
|
const end_notes = [
|
|
51
71
|
`Discord: ${external_chalk_default().underline(external_chalk_default().cyan('https://zephyr-cloud.io/discord'))}`,
|
|
52
|
-
`Documentation: ${external_chalk_default().underline(external_chalk_default().cyan('https://zephyr-cloud.io/docs'))}`,
|
|
72
|
+
`Documentation: ${'web' === project.type ? external_chalk_default().underline(external_chalk_default().cyan('https://docs.zephyr-cloud.io/recipes')) : external_chalk_default().underline(external_chalk_default().cyan('https://docs.zephyr-cloud.io/recipes/repack-mf'))}`,
|
|
53
73
|
`Open an issue: ${external_chalk_default().underline(external_chalk_default().cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`
|
|
54
74
|
];
|
|
55
75
|
(0, prompts_namespaceObject.note)(Object.values(end_notes).join('\n'), 'Problems?');
|
|
@@ -144,12 +164,13 @@ async function main() {
|
|
|
144
164
|
options: [
|
|
145
165
|
{
|
|
146
166
|
value: 'web',
|
|
147
|
-
label: 'Web'
|
|
167
|
+
label: 'Web',
|
|
168
|
+
hint: 'You will be choosing from a selection of templates provided by us.'
|
|
148
169
|
},
|
|
149
170
|
{
|
|
150
171
|
value: 'react-native',
|
|
151
172
|
label: 'React Native',
|
|
152
|
-
hint: 'You will be building React Native powered by Re.Pack.'
|
|
173
|
+
hint: 'This is a comprehensive example project provided by us. You will be building React Native powered by Re.Pack.'
|
|
153
174
|
}
|
|
154
175
|
]
|
|
155
176
|
}),
|
package/dist/index.mjs
CHANGED
|
@@ -9,20 +9,40 @@ import * as __WEBPACK_EXTERNAL_MODULE_path__ from "path";
|
|
|
9
9
|
import * as __WEBPACK_EXTERNAL_MODULE_node_fs_5ea92f0c__ from "node:fs";
|
|
10
10
|
function end_note({ project }) {
|
|
11
11
|
try {
|
|
12
|
-
(0, __WEBPACK_EXTERNAL_MODULE_child_process__.exec)(
|
|
13
|
-
console.log(stdout);
|
|
12
|
+
(0, __WEBPACK_EXTERNAL_MODULE_child_process__.exec)("git config user.name", (err, stdout, stderr)=>{
|
|
14
13
|
const user_name = stdout.toString().trim();
|
|
15
14
|
const repo_name = project.path.split('/').pop();
|
|
16
15
|
let next_steps;
|
|
17
|
-
next_steps = 'web' === project.type ?
|
|
18
|
-
|
|
16
|
+
next_steps = 'web' === project.type ? [
|
|
17
|
+
`cd ${repo_name}`,
|
|
18
|
+
"pnpm install",
|
|
19
|
+
"rm -rf .git",
|
|
20
|
+
"git init",
|
|
21
|
+
`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`,
|
|
22
|
+
"git add .",
|
|
23
|
+
'git commit -m "Initial commit"',
|
|
24
|
+
"pnpm run build"
|
|
25
|
+
] : [
|
|
26
|
+
`cd ${repo_name}`,
|
|
27
|
+
"pnpm install",
|
|
28
|
+
"rm -rf .git",
|
|
29
|
+
"git init",
|
|
30
|
+
__WEBPACK_EXTERNAL_MODULE_chalk__["default"].magenta(`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`),
|
|
31
|
+
"git add .",
|
|
32
|
+
'git commit -m "Initial commit"',
|
|
33
|
+
"ZC=1 pnpm run start",
|
|
34
|
+
`\n--------------------------------\n`,
|
|
35
|
+
"Make your first commit and link it to the remote repository!",
|
|
36
|
+
`Read more about how Module Federation works with Zephyr and why steps above are required: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://docs.zephyr-cloud.io/how-to/mf-guide'))}`
|
|
37
|
+
];
|
|
38
|
+
(0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan(next_steps.join('\n')), 'Next steps.');
|
|
19
39
|
});
|
|
20
40
|
} catch (error) {
|
|
21
41
|
console.error(error);
|
|
22
42
|
} finally{
|
|
23
43
|
const end_notes = [
|
|
24
44
|
`Discord: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://zephyr-cloud.io/discord'))}`,
|
|
25
|
-
`Documentation: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://zephyr-cloud.io/docs'))}`,
|
|
45
|
+
`Documentation: ${'web' === project.type ? __WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://docs.zephyr-cloud.io/recipes')) : __WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://docs.zephyr-cloud.io/recipes/repack-mf'))}`,
|
|
26
46
|
`Open an issue: ${__WEBPACK_EXTERNAL_MODULE_chalk__["default"].underline(__WEBPACK_EXTERNAL_MODULE_chalk__["default"].cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`
|
|
27
47
|
];
|
|
28
48
|
(0, __WEBPACK_EXTERNAL_MODULE__clack_prompts_3cae1695__.note)(Object.values(end_notes).join('\n'), 'Problems?');
|
|
@@ -113,12 +133,13 @@ async function main() {
|
|
|
113
133
|
options: [
|
|
114
134
|
{
|
|
115
135
|
value: 'web',
|
|
116
|
-
label: 'Web'
|
|
136
|
+
label: 'Web',
|
|
137
|
+
hint: 'You will be choosing from a selection of templates provided by us.'
|
|
117
138
|
},
|
|
118
139
|
{
|
|
119
140
|
value: 'react-native',
|
|
120
141
|
label: 'React Native',
|
|
121
|
-
hint: 'You will be building React Native powered by Re.Pack.'
|
|
142
|
+
hint: 'This is a comprehensive example project provided by us. You will be building React Native powered by Re.Pack.'
|
|
122
143
|
}
|
|
123
144
|
]
|
|
124
145
|
}),
|
package/package/index.ts
CHANGED
|
@@ -65,11 +65,12 @@ async function main() {
|
|
|
65
65
|
{
|
|
66
66
|
value: 'web',
|
|
67
67
|
label: 'Web',
|
|
68
|
+
hint: 'You will be choosing from a selection of templates provided by us.',
|
|
68
69
|
},
|
|
69
70
|
{
|
|
70
71
|
value: 'react-native',
|
|
71
72
|
label: 'React Native',
|
|
72
|
-
hint: 'You will be building React Native powered by Re.Pack.',
|
|
73
|
+
hint: 'This is a comprehensive example project provided by us. You will be building React Native powered by Re.Pack.',
|
|
73
74
|
},
|
|
74
75
|
],
|
|
75
76
|
}),
|
package/package/utils/end.ts
CHANGED
|
@@ -5,9 +5,7 @@ import { note } from '@clack/prompts';
|
|
|
5
5
|
|
|
6
6
|
export default function end_note({ project }: { project: CLIOptions }) {
|
|
7
7
|
try {
|
|
8
|
-
exec(
|
|
9
|
-
console.log(stdout);
|
|
10
|
-
|
|
8
|
+
exec(`git config user.name`, (err, stdout, stderr) => {
|
|
11
9
|
const user_name = stdout.toString().trim();
|
|
12
10
|
|
|
13
11
|
const repo_name = project.path.split('/').pop();
|
|
@@ -15,19 +13,40 @@ export default function end_note({ project }: { project: CLIOptions }) {
|
|
|
15
13
|
let next_steps;
|
|
16
14
|
|
|
17
15
|
if (project.type === 'web') {
|
|
18
|
-
next_steps =
|
|
16
|
+
next_steps = [
|
|
17
|
+
`cd ${repo_name}`,
|
|
18
|
+
`pnpm install`,
|
|
19
|
+
`rm -rf .git`,
|
|
20
|
+
`git init`,
|
|
21
|
+
`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`,
|
|
22
|
+
`git add .`,
|
|
23
|
+
`git commit -m "Initial commit"`,
|
|
24
|
+
`pnpm run build`,
|
|
25
|
+
];
|
|
19
26
|
} else {
|
|
20
|
-
next_steps =
|
|
27
|
+
next_steps = [
|
|
28
|
+
`cd ${repo_name}`,
|
|
29
|
+
`pnpm install`,
|
|
30
|
+
`rm -rf .git`,
|
|
31
|
+
`git init`,
|
|
32
|
+
c.magenta(`git remote add origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git`),
|
|
33
|
+
`git add .`,
|
|
34
|
+
`git commit -m "Initial commit"`,
|
|
35
|
+
`ZC=1 pnpm run start`,
|
|
36
|
+
`\n--------------------------------\n`,
|
|
37
|
+
`Make your first commit and link it to the remote repository!`,
|
|
38
|
+
`Read more about how Module Federation works with Zephyr and why steps above are required: ${c.underline(c.cyan('https://docs.zephyr-cloud.io/how-to/mf-guide'))}`,
|
|
39
|
+
];
|
|
21
40
|
}
|
|
22
41
|
|
|
23
|
-
note(next_steps, 'Next steps.');
|
|
42
|
+
note(c.cyan(next_steps.join('\n')), 'Next steps.');
|
|
24
43
|
});
|
|
25
44
|
} catch (error) {
|
|
26
45
|
console.error(error);
|
|
27
46
|
} finally {
|
|
28
47
|
const end_notes = [
|
|
29
48
|
`Discord: ${c.underline(c.cyan('https://zephyr-cloud.io/discord'))}`,
|
|
30
|
-
`Documentation: ${c.underline(c.cyan('https://zephyr-cloud.io/docs'))}`,
|
|
49
|
+
`Documentation: ${project.type === 'web' ? c.underline(c.cyan('https://docs.zephyr-cloud.io/recipes')) : c.underline(c.cyan('https://docs.zephyr-cloud.io/recipes/repack-mf'))}`,
|
|
31
50
|
`Open an issue: ${c.underline(c.cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`,
|
|
32
51
|
];
|
|
33
52
|
|