create-vxrn 0.1.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.
- package/LICENSE +21 -0
- package/biome.json +78 -0
- package/dist/helpers/cloneStarter.js +79 -0
- package/dist/helpers/cloneStarter.js.map +6 -0
- package/dist/helpers/cloneStarter.native.js +320 -0
- package/dist/helpers/cloneStarter.native.js.map +6 -0
- package/dist/helpers/getProjectName.js +45 -0
- package/dist/helpers/getProjectName.js.map +6 -0
- package/dist/helpers/getProjectName.native.js +185 -0
- package/dist/helpers/getProjectName.native.js.map +6 -0
- package/dist/helpers/getTemplateInfo.js +38 -0
- package/dist/helpers/getTemplateInfo.js.map +6 -0
- package/dist/helpers/getTemplateInfo.native.js +191 -0
- package/dist/helpers/getTemplateInfo.native.js.map +6 -0
- package/dist/helpers/installDependencies.js +33 -0
- package/dist/helpers/installDependencies.js.map +6 -0
- package/dist/helpers/installDependencies.native.js +187 -0
- package/dist/helpers/installDependencies.native.js.map +6 -0
- package/dist/helpers/validateNpmPackage.js +36 -0
- package/dist/helpers/validateNpmPackage.js.map +6 -0
- package/dist/helpers/validateNpmPackage.native.js +74 -0
- package/dist/helpers/validateNpmPackage.native.js.map +6 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +6 -0
- package/dist/index.native.js +300 -0
- package/dist/index.native.js.map +6 -0
- package/dist/steps/bare.js +38 -0
- package/dist/steps/bare.js.map +6 -0
- package/dist/steps/bare.native.js +163 -0
- package/dist/steps/bare.native.js.map +6 -0
- package/dist/steps/expo-router.js +41 -0
- package/dist/steps/expo-router.js.map +6 -0
- package/dist/steps/expo-router.native.js +168 -0
- package/dist/steps/expo-router.native.js.map +6 -0
- package/dist/steps/tamagui.js +41 -0
- package/dist/steps/tamagui.js.map +6 -0
- package/dist/steps/tamagui.native.js +168 -0
- package/dist/steps/tamagui.native.js.map +6 -0
- package/dist/steps/types.js +14 -0
- package/dist/steps/types.js.map +6 -0
- package/dist/steps/types.native.js +15 -0
- package/dist/steps/types.native.js.map +6 -0
- package/dist/templates.js +84 -0
- package/dist/templates.js.map +6 -0
- package/dist/templates.native.js +97 -0
- package/dist/templates.native.js.map +6 -0
- package/package.json +33 -0
- package/readme.md +5 -0
- package/run.js +12 -0
- package/src/helpers/cloneStarter.ts +115 -0
- package/src/helpers/getProjectName.ts +46 -0
- package/src/helpers/getTemplateInfo.ts +32 -0
- package/src/helpers/installDependencies.ts +14 -0
- package/src/helpers/validateNpmPackage.ts +16 -0
- package/src/index.ts +170 -0
- package/src/steps/bare.ts +21 -0
- package/src/steps/expo-router.ts +25 -0
- package/src/steps/tamagui.ts +25 -0
- package/src/steps/types.ts +5 -0
- package/src/templates.ts +62 -0
- package/tsconfig.json +12 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ansis from 'ansis'
|
|
2
|
+
|
|
3
|
+
import type { ExtraSteps } from './types'
|
|
4
|
+
|
|
5
|
+
const packageManager = 'yarn'
|
|
6
|
+
const useYarn = packageManager === 'yarn'
|
|
7
|
+
|
|
8
|
+
const runCommand = (scriptName: string) => `${packageManager} ${useYarn ? '' : 'run '}${scriptName}`
|
|
9
|
+
|
|
10
|
+
const main: ExtraSteps = async ({ isFullClone, projectName }) => {
|
|
11
|
+
if (isFullClone) {
|
|
12
|
+
console.info(`
|
|
13
|
+
${ansis.green.bold('Done!')} created a new project under ./${projectName}
|
|
14
|
+
|
|
15
|
+
visit your project:
|
|
16
|
+
${ansis.green('cd')} ${projectName}
|
|
17
|
+
`)
|
|
18
|
+
}
|
|
19
|
+
console.info(`
|
|
20
|
+
To start the Next.js development server, run:
|
|
21
|
+
${ansis.green(runCommand('web'))}
|
|
22
|
+
`)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default main
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ansis from 'ansis'
|
|
2
|
+
|
|
3
|
+
import type { ExtraSteps } from './types'
|
|
4
|
+
|
|
5
|
+
const packageManager = 'yarn'
|
|
6
|
+
const useYarn = packageManager === 'yarn'
|
|
7
|
+
|
|
8
|
+
const runCommand = (scriptName: string) => `${packageManager} ${useYarn ? '' : 'run '}${scriptName}`
|
|
9
|
+
|
|
10
|
+
const main: ExtraSteps = async ({ isFullClone, projectName }) => {
|
|
11
|
+
if (isFullClone) {
|
|
12
|
+
console.info(`
|
|
13
|
+
${ansis.green.bold('Done!')} created a new project under ./${projectName}
|
|
14
|
+
|
|
15
|
+
visit your project:
|
|
16
|
+
${ansis.green('cd')} ${projectName}
|
|
17
|
+
`)
|
|
18
|
+
}
|
|
19
|
+
console.info(`
|
|
20
|
+
To start the Remix development server, run:
|
|
21
|
+
${ansis.green(runCommand('dev'))}
|
|
22
|
+
`)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default main
|
package/src/templates.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import stepsBare from './steps/bare'
|
|
2
|
+
import stepsExpoRouter from './steps/expo-router'
|
|
3
|
+
import stepsTamagui from './steps/tamagui'
|
|
4
|
+
|
|
5
|
+
export const templates = [
|
|
6
|
+
// {
|
|
7
|
+
// title: `Free - Expo + Next in a production ready monorepo`,
|
|
8
|
+
// value: 'starter-free',
|
|
9
|
+
// type: 'free',
|
|
10
|
+
// hidden: false,
|
|
11
|
+
// packageManager: 'yarn',
|
|
12
|
+
// repo: {
|
|
13
|
+
// url: `https://github.com/tamagui/starter-free.git`,
|
|
14
|
+
// sshFallback: `git@github.com:tamagui/starter-free.git`,
|
|
15
|
+
// dir: [],
|
|
16
|
+
// branch: 'main',
|
|
17
|
+
// },
|
|
18
|
+
// extraSteps: starterFree,
|
|
19
|
+
// },
|
|
20
|
+
|
|
21
|
+
{
|
|
22
|
+
title: `Bare`,
|
|
23
|
+
value: 'bare',
|
|
24
|
+
type: 'included-in-monorepo',
|
|
25
|
+
hidden: false,
|
|
26
|
+
repo: {
|
|
27
|
+
url: `https://github.com/natew/vxrn.git`,
|
|
28
|
+
sshFallback: `git@github.com:natew/vxrn.git`,
|
|
29
|
+
dir: [`examples`, `vxrn`],
|
|
30
|
+
branch: 'main',
|
|
31
|
+
},
|
|
32
|
+
extraSteps: stepsBare,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
title: `Tamagui`,
|
|
37
|
+
value: 'tamagui',
|
|
38
|
+
type: 'included-in-monorepo',
|
|
39
|
+
hidden: false,
|
|
40
|
+
repo: {
|
|
41
|
+
url: `https://github.com/natew/vxrn.git`,
|
|
42
|
+
sshFallback: `git@github.com:natew/vxrn.git`,
|
|
43
|
+
dir: [`examples`, `tamagui`],
|
|
44
|
+
branch: 'main',
|
|
45
|
+
},
|
|
46
|
+
extraSteps: stepsTamagui,
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
{
|
|
50
|
+
title: `Expo Router`,
|
|
51
|
+
value: 'expo-router',
|
|
52
|
+
type: 'included-in-monorepo',
|
|
53
|
+
hidden: false,
|
|
54
|
+
repo: {
|
|
55
|
+
url: `https://github.com/natew/vxrn.git`,
|
|
56
|
+
sshFallback: `git@github.com:natew/vxrn.git`,
|
|
57
|
+
dir: [`examples`, `expo-router`],
|
|
58
|
+
branch: 'main',
|
|
59
|
+
},
|
|
60
|
+
extraSteps: stepsExpoRouter,
|
|
61
|
+
},
|
|
62
|
+
] as const
|
package/tsconfig.json
ADDED