create-zephyr-apps 0.0.1 → 0.0.2
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/README.md +11 -0
- package/package/utils/end.ts +28 -35
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -5,3 +5,14 @@ Recommend using node version 22.0.0 or above.
|
|
|
5
5
|
```
|
|
6
6
|
npx create-zephyr-apps@latest
|
|
7
7
|
```
|
|
8
|
+
|
|
9
|
+
## Todos
|
|
10
|
+
|
|
11
|
+
- [ ] Move templates generation to local or using normal vite/rspack/react-native generation command
|
|
12
|
+
- [ ] Add bundling options
|
|
13
|
+
- [ ] Creating template file to make sure dependencies are up to date
|
|
14
|
+
- [ ] Add Nx as an option for monorepo
|
|
15
|
+
- [ ] Add package manager selector
|
|
16
|
+
- [ ] Add tests
|
|
17
|
+
- [ ] Add more documentation
|
|
18
|
+
- [ ] Write a good readme
|
package/package/utils/end.ts
CHANGED
|
@@ -1,44 +1,37 @@
|
|
|
1
|
-
import { CLIOptions } from
|
|
2
|
-
import c from
|
|
3
|
-
import { exec } from
|
|
4
|
-
import { note } from
|
|
5
|
-
|
|
1
|
+
import { CLIOptions } from './types';
|
|
2
|
+
import c from 'chalk';
|
|
3
|
+
import { exec } from 'child_process';
|
|
4
|
+
import { note } from '@clack/prompts';
|
|
6
5
|
|
|
7
6
|
export default function end_note({ project }: { project: CLIOptions }) {
|
|
7
|
+
try {
|
|
8
|
+
exec(`${project.path} && git config user.name`, (err, stdout, stderr) => {
|
|
9
|
+
console.log(stdout);
|
|
8
10
|
|
|
11
|
+
const user_name = stdout.toString().trim();
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
exec(`${project.path} && git config user.name`, (err, stdout, stderr) => {
|
|
12
|
-
console.log(stdout)
|
|
13
|
-
|
|
14
|
-
const user_name = stdout.toString().trim()
|
|
15
|
-
|
|
16
|
-
const repo_name = project.path.split('/').pop()
|
|
17
|
-
|
|
18
|
-
let next_steps;
|
|
19
|
-
|
|
20
|
-
if (project.type === 'web') {
|
|
21
|
-
next_steps = `cd ${repo_name} \npnpm install\ngit remote add origin https://github.com/${user_name ?? 'YourUsername'}/${repo_name}.git\npnpm run build`;
|
|
22
|
-
} else {
|
|
23
|
-
next_steps = `cd ${repo_name} \npnpm install\nrm -rf .git\ngit remote set origin https://github.com/${user_name ?? 'YourUsername'}/${repo_name}.git\npnpm run build`;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
note(next_steps, 'Next steps.')
|
|
28
|
-
})
|
|
29
|
-
} catch (error) {
|
|
30
|
-
console.error(error)
|
|
31
|
-
} finally {
|
|
32
|
-
|
|
33
|
-
const end_notes = [`Discord: ${c.underline(c.cyan('https://zephyr-cloud.io/discord'))}`,
|
|
34
|
-
`Documentation: ${c.underline(c.cyan('https://zephyr-cloud.io/docs'))}`,
|
|
35
|
-
`Open an issue: ${c.underline(c.cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`
|
|
36
|
-
]
|
|
13
|
+
const repo_name = project.path.split('/').pop();
|
|
37
14
|
|
|
38
|
-
|
|
39
|
-
}
|
|
15
|
+
let next_steps;
|
|
40
16
|
|
|
17
|
+
if (project.type === 'web') {
|
|
18
|
+
next_steps = `cd ${repo_name} \npnpm install\ngit remote add origin https://github.com/${user_name ?? 'YourUsername'}/${repo_name}.git\npnpm run build`;
|
|
19
|
+
} else {
|
|
20
|
+
next_steps = `cd ${repo_name} \npnpm install\nrm -rf .git\ngit remote set origin https://github.com/${user_name.length >= 1 ? user_name : 'YourUsername'}/${repo_name}.git\npnpm run build`;
|
|
21
|
+
}
|
|
41
22
|
|
|
23
|
+
note(next_steps, 'Next steps.');
|
|
24
|
+
});
|
|
25
|
+
} catch (error) {
|
|
26
|
+
console.error(error);
|
|
27
|
+
} finally {
|
|
28
|
+
const end_notes = [
|
|
29
|
+
`Discord: ${c.underline(c.cyan('https://zephyr-cloud.io/discord'))}`,
|
|
30
|
+
`Documentation: ${c.underline(c.cyan('https://zephyr-cloud.io/docs'))}`,
|
|
31
|
+
`Open an issue: ${c.underline(c.cyan('https://github.com/ZephyrCloudIO/create-zephyr-apps/issues'))}`,
|
|
32
|
+
];
|
|
42
33
|
|
|
34
|
+
note(Object.values(end_notes).join('\n'), 'Problems?');
|
|
35
|
+
}
|
|
36
|
+
}
|
|
43
37
|
|
|
44
|
-
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-zephyr-apps",
|
|
3
3
|
"module": "./src/index.ts",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "rslib build",
|
|
8
8
|
"dev": "tsx package/index.ts"
|
|
9
9
|
},
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "ZephyrCloudIO",
|
|
12
|
+
"url": "https://github.com/ZephyrCloudIO"
|
|
13
|
+
},
|
|
10
14
|
"bin": {
|
|
11
15
|
"create-zephyr-apps": "./dist/index.mjs"
|
|
12
16
|
},
|
|
@@ -42,4 +46,5 @@
|
|
|
42
46
|
"example",
|
|
43
47
|
"template"
|
|
44
48
|
]
|
|
45
|
-
}
|
|
49
|
+
}
|
|
50
|
+
|