MCPcopy
hub / github.com/obytes/react-native-template-obytes / createObytesApp

Function createObytesApp

cli/index.js:8–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6const { setupProject, installDeps } = require('./setup-project.js');
7
8const createObytesApp = async () => {
9 consola.box('Obytes Starter\nPerfect React Native App Kickstart 🚀!');
10 // get project name from command line
11 const projectName = process.argv[2];
12 // check if project name is provided
13 if (!projectName) {
14 consola.error(
15 'Please provide a name for your project: `npx create-obytes-app@latest <project-name>`'
16 );
17 process.exit(1);
18 }
19 // clone the last release of the template from github
20 await cloneLastTemplateRelease(projectName);
21
22 // setup the project: remove unnecessary files, update package.json infos, name and set version to 0.0.1 + add initial version to osMetadata
23 await setupProject(projectName);
24
25 // install project dependencies using pnpm
26 await installDeps(projectName);
27
28 // show instructions to run the project + link to the documentation
29 showMoreDetails(projectName);
30};
31
32createObytesApp();

Callers 1

index.jsFile · 0.85

Calls 4

cloneLastTemplateReleaseFunction · 0.85
setupProjectFunction · 0.85
installDepsFunction · 0.85
showMoreDetailsFunction · 0.85

Tested by

no test coverage detected