create-vxrn 2.6.15 → 2.6.17

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.
@@ -1,2 +1,2 @@
1
1
  $ tamagui-build
2
- built create-vxrn in 499 ms
2
+ built create-vxrn in 469 ms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-vxrn",
3
- "version": "2.6.15",
3
+ "version": "2.6.17",
4
4
  "bin": {
5
5
  "create-vxrn": "run.js"
6
6
  },
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@types/validate-npm-package-name": "^4.0.2",
35
- "@vxrn/utils": "2.6.15",
35
+ "@vxrn/utils": "2.6.17",
36
36
  "ansis": "^3.1.0",
37
37
  "async-retry": "1.3.1",
38
38
  "citty": "^0.1.6",
@@ -44,14 +44,14 @@
44
44
  "yocto-spinner": "^0.1.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@tamagui/build": "3.0.5",
47
+ "@tamagui/build": "3.0.7",
48
48
  "@types/prompts": "^2.4.9",
49
49
  "typescript": "7.0.2"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "releaseSourceCommit": "6208707137a490f8e47d132cdecca3be3dd3e524",
54
+ "releaseSourceCommit": "2bf365d7600533e730e60a15bfb2d72ad3565ec9",
55
55
  "repository": {
56
56
  "type": "git",
57
57
  "url": "git+https://github.com/onejs/one.git",
@@ -1,99 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
26
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var bare_exports = {};
28
- __export(bare_exports, {
29
- default: () => bare_default,
30
- replaceNameInUTF8File: () => replaceNameInUTF8File
31
- });
32
- module.exports = __toCommonJS(bare_exports);
33
- var import_ansis = __toESM(require("ansis"));
34
- var import_fs_extra = __toESM(require("fs-extra"));
35
- var import_node_path = require("node:path");
36
- function shouldIgnoreFile(filePath) {
37
- return filePath.match(/node_modules|yarn.lock|package-lock.json/g);
38
- }
39
- function shouldRenameFile(filePath, nameToReplace) {
40
- return (0, import_node_path.basename)(filePath).includes(nameToReplace);
41
- }
42
- async function renameFile(filePath, oldName, newName) {
43
- const newFileName = (0, import_node_path.join)((0, import_node_path.dirname)(filePath), (0, import_node_path.basename)(filePath).replace(new RegExp(oldName, "g"), newName));
44
- await import_fs_extra.default.rename(filePath, newFileName);
45
- }
46
- function walk(current) {
47
- if (!import_fs_extra.default.lstatSync(current).isDirectory()) {
48
- return [current];
49
- }
50
- const files = import_fs_extra.default.readdirSync(current).map((child) => walk((0, import_node_path.join)(current, child)));
51
- const result = [];
52
- return result.concat.apply([current], files);
53
- }
54
- async function replaceNameInUTF8File(filePath, projectName, templateName) {
55
- const fileContent = await import_fs_extra.default.readFile(filePath, "utf8");
56
- const replacedFileContent = fileContent.replace(new RegExp(templateName, "g"), projectName).replace(new RegExp(templateName.toLowerCase(), "g"), projectName.toLowerCase());
57
- if (fileContent !== replacedFileContent) {
58
- await import_fs_extra.default.writeFile(filePath, replacedFileContent, "utf8");
59
- }
60
- }
61
- const main = async ({ isFullClone, projectName }) => {
62
- const placeholderName = "bare";
63
- for (const filePath of walk(process.cwd()).reverse()) {
64
- if (shouldIgnoreFile(filePath)) {
65
- continue;
66
- }
67
- if (!(await import_fs_extra.default.stat(filePath)).isDirectory()) {
68
- await replaceNameInUTF8File(filePath, projectName, "bare");
69
- }
70
- if (shouldRenameFile(filePath, placeholderName)) {
71
- await renameFile(filePath, placeholderName, projectName);
72
- } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {
73
- await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());
74
- }
75
- }
76
- if (isFullClone) {
77
- console.info(`
78
- ${import_ansis.default.green.bold("Done!")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:
79
- \u2022 ${import_ansis.default.green("cd")} ${projectName}
80
-
81
- ${import_ansis.default.green(`Run instructions for ${import_ansis.default.bold("Android")}:`)}
82
- \u2022 Have an Android emulator running (quickest way to get started), or a device connected.
83
- \u2022 npx react-native run-android
84
-
85
- ${import_ansis.default.blue(`Run instructions for ${import_ansis.default.bold("iOS")}:`)}
86
- \u2022 Install Cocoapods
87
- \u2022 bundle install # you need to run this only once in your project.
88
- \u2022 bundle exec pod install
89
- \u2022 cd ..
90
-
91
- \u2022 npx react-native run-ios
92
- ${import_ansis.default.gray("- or -")}
93
- \u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run "xed -b ios"
94
- \u2022 Hit the Run button
95
-
96
- `);
97
- }
98
- };
99
- var bare_default = main;
@@ -1,121 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
14
- };
15
- var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
- value: mod,
26
- enumerable: true
27
- }) : target, mod));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var bare_exports = {};
30
- __export(bare_exports, {
31
- default: () => bare_default,
32
- replaceNameInUTF8File: () => replaceNameInUTF8File
33
- });
34
- module.exports = __toCommonJS(bare_exports);
35
- var import_ansis = __toESM(require("ansis"));
36
- var import_fs_extra = __toESM(require("fs-extra"));
37
- var import_path = require("path");
38
- function shouldIgnoreFile(filePath) {
39
- return filePath.match(/node_modules|yarn.lock|package-lock.json/g);
40
- }
41
- function shouldRenameFile(filePath, nameToReplace) {
42
- return (0, import_path.basename)(filePath).includes(nameToReplace);
43
- }
44
- async function renameFile(filePath, oldName, newName) {
45
- var newFileName = (0, import_path.join)((0, import_path.dirname)(filePath), (0, import_path.basename)(filePath).replace(new RegExp(oldName, "g"), newName));
46
- await import_fs_extra.default.rename(filePath, newFileName);
47
- }
48
- function walk(current) {
49
- if (!import_fs_extra.default.lstatSync(current).isDirectory()) {
50
- return [current];
51
- }
52
- var files = import_fs_extra.default.readdirSync(current).map(function(child) {
53
- return walk((0, import_path.join)(current, child));
54
- });
55
- var result = [];
56
- return result.concat.apply([current], files);
57
- }
58
- async function replaceNameInUTF8File(filePath, projectName, templateName) {
59
- var fileContent = await import_fs_extra.default.readFile(filePath, "utf8");
60
- var replacedFileContent = fileContent.replace(new RegExp(templateName, "g"), projectName).replace(new RegExp(templateName.toLowerCase(), "g"), projectName.toLowerCase());
61
- if (fileContent !== replacedFileContent) {
62
- await import_fs_extra.default.writeFile(filePath, replacedFileContent, "utf8");
63
- }
64
- }
65
- var main = async function main2(param) {
66
- var { isFullClone, projectName } = param;
67
- var placeholderName = "bare";
68
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
69
- try {
70
- for (var _iterator = walk(process.cwd()).reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
71
- var filePath = _step.value;
72
- if (shouldIgnoreFile(filePath)) {
73
- continue;
74
- }
75
- if (!(await import_fs_extra.default.stat(filePath)).isDirectory()) {
76
- await replaceNameInUTF8File(filePath, projectName, "bare");
77
- }
78
- if (shouldRenameFile(filePath, placeholderName)) {
79
- await renameFile(filePath, placeholderName, projectName);
80
- } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {
81
- await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());
82
- }
83
- }
84
- } catch (err) {
85
- _didIteratorError = true;
86
- _iteratorError = err;
87
- } finally {
88
- try {
89
- if (!_iteratorNormalCompletion && _iterator.return != null) {
90
- _iterator.return();
91
- }
92
- } finally {
93
- if (_didIteratorError) {
94
- throw _iteratorError;
95
- }
96
- }
97
- }
98
- if (isFullClone) {
99
- console.info(`
100
- ${import_ansis.default.green.bold("Done!")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:
101
- \u2022 ${import_ansis.default.green("cd")} ${projectName}
102
-
103
- ${import_ansis.default.green(`Run instructions for ${import_ansis.default.bold("Android")}:`)}
104
- \u2022 Have an Android emulator running (quickest way to get started), or a device connected.
105
- \u2022 npx react-native run-android
106
-
107
- ${import_ansis.default.blue(`Run instructions for ${import_ansis.default.bold("iOS")}:`)}
108
- \u2022 Install Cocoapods
109
- \u2022 bundle install # you need to run this only once in your project.
110
- \u2022 bundle exec pod install
111
- \u2022 cd ..
112
-
113
- \u2022 npx react-native run-ios
114
- ${import_ansis.default.gray("- or -")}
115
- \u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run "xed -b ios"
116
- \u2022 Hit the Run button
117
-
118
- `);
119
- }
120
- };
121
- var bare_default = main;
@@ -1,123 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
14
- };
15
- var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
- value: mod,
26
- enumerable: true
27
- }) : target, mod));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var bare_exports = {};
30
- __export(bare_exports, {
31
- default: () => bare_default,
32
- replaceNameInUTF8File: () => replaceNameInUTF8File
33
- });
34
- module.exports = __toCommonJS(bare_exports);
35
- var import_ansis = __toESM(require("ansis"));
36
- var import_fs_extra = __toESM(require("fs-extra"));
37
- var import_path = require("path");
38
- function shouldIgnoreFile(filePath) {
39
- return filePath.match(/node_modules|yarn.lock|package-lock.json/g);
40
- }
41
- function shouldRenameFile(filePath, nameToReplace) {
42
- return (0, import_path.basename)(filePath).includes(nameToReplace);
43
- }
44
- async function renameFile(filePath, oldName, newName) {
45
- var newFileName = (0, import_path.join)((0, import_path.dirname)(filePath), (0, import_path.basename)(filePath).replace(new RegExp(oldName, "g"), newName));
46
- await import_fs_extra.default.rename(filePath, newFileName);
47
- }
48
- function walk(current) {
49
- if (!import_fs_extra.default.lstatSync(current).isDirectory()) {
50
- return [current];
51
- }
52
- var files = import_fs_extra.default.readdirSync(current).map(function(child) {
53
- return walk((0, import_path.join)(current, child));
54
- });
55
- var result = [];
56
- return result.concat.apply([current], files);
57
- }
58
- async function replaceNameInUTF8File(filePath, projectName, templateName) {
59
- var fileContent = await import_fs_extra.default.readFile(filePath, "utf8");
60
- var replacedFileContent = fileContent.replace(new RegExp(templateName, "g"), projectName).replace(new RegExp(templateName.toLowerCase(), "g"), projectName.toLowerCase());
61
- if (fileContent !== replacedFileContent) {
62
- await import_fs_extra.default.writeFile(filePath, replacedFileContent, "utf8");
63
- }
64
- }
65
- var main = async function main2(param) {
66
- var { isFullClone, projectName } = param;
67
- var placeholderName = "bare";
68
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
69
- try {
70
- for (var _iterator = walk(process.cwd()).reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
71
- var filePath = _step.value;
72
- if (shouldIgnoreFile(filePath)) {
73
- continue;
74
- }
75
- if (!(await import_fs_extra.default.stat(filePath)).isDirectory()) {
76
- await replaceNameInUTF8File(filePath, projectName, "bare");
77
- }
78
- if (shouldRenameFile(filePath, placeholderName)) {
79
- await renameFile(filePath, placeholderName, projectName);
80
- } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {
81
- await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());
82
- }
83
- }
84
- } catch (err) {
85
- _didIteratorError = true;
86
- _iteratorError = err;
87
- } finally {
88
- try {
89
- if (!_iteratorNormalCompletion && _iterator.return != null) {
90
- _iterator.return();
91
- }
92
- } finally {
93
- if (_didIteratorError) {
94
- throw _iteratorError;
95
- }
96
- }
97
- }
98
- if (isFullClone) {
99
- console.info(`
100
- ${import_ansis.default.green.bold("Done!")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:
101
- \u2022 ${import_ansis.default.green("cd")} ${projectName}
102
-
103
- ${import_ansis.default.green(`Run instructions for ${import_ansis.default.bold("Android")}:`)}
104
- \u2022 Have an Android emulator running (quickest way to get started), or a device connected.
105
- \u2022 npx react-native run-android
106
-
107
- ${import_ansis.default.blue(`Run instructions for ${import_ansis.default.bold("iOS")}:`)}
108
- \u2022 Install Cocoapods
109
- \u2022 bundle install # you need to run this only once in your project.
110
- \u2022 bundle exec pod install
111
- \u2022 cd ..
112
-
113
- \u2022 npx react-native run-ios
114
- ${import_ansis.default.gray("- or -")}
115
- \u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run "xed -b ios"
116
- \u2022 Hit the Run button
117
-
118
- `);
119
- }
120
- };
121
- var bare_default = main;
122
-
123
- //# sourceMappingURL=bare.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bare.native.js","names":[],"sources":["cjs/steps/bare.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar bare_exports = {};\n__export(bare_exports, {\n default: () => bare_default,\n replaceNameInUTF8File: () => replaceNameInUTF8File\n});\nmodule.exports = __toCommonJS(bare_exports);\nvar import_ansis = __toESM(require(\"ansis\"));\nvar import_fs_extra = __toESM(require(\"fs-extra\"));\nvar import_path = require(\"path\");\nfunction shouldIgnoreFile(filePath) {\n return filePath.match(/node_modules|yarn.lock|package-lock.json/g);\n}\nfunction shouldRenameFile(filePath, nameToReplace) {\n return (0, import_path.basename)(filePath).includes(nameToReplace);\n}\nasync function renameFile(filePath, oldName, newName) {\n var newFileName = (0, import_path.join)((0, import_path.dirname)(filePath), (0, import_path.basename)(filePath).replace(new RegExp(oldName, \"g\"), newName));\n await import_fs_extra.default.rename(filePath, newFileName);\n}\nfunction walk(current) {\n if (!import_fs_extra.default.lstatSync(current).isDirectory()) {\n return [\n current\n ];\n }\n var files = import_fs_extra.default.readdirSync(current).map(function(child) {\n return walk((0, import_path.join)(current, child));\n });\n var result = [];\n return result.concat.apply([\n current\n ], files);\n}\nasync function replaceNameInUTF8File(filePath, projectName, templateName) {\n var fileContent = await import_fs_extra.default.readFile(filePath, \"utf8\");\n var replacedFileContent = fileContent.replace(new RegExp(templateName, \"g\"), projectName).replace(new RegExp(templateName.toLowerCase(), \"g\"), projectName.toLowerCase());\n if (fileContent !== replacedFileContent) {\n await import_fs_extra.default.writeFile(filePath, replacedFileContent, \"utf8\");\n }\n}\nvar main = async function main2(param) {\n var { isFullClone, projectName } = param;\n var placeholderName = \"bare\";\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = walk(process.cwd()).reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var filePath = _step.value;\n if (shouldIgnoreFile(filePath)) {\n continue;\n }\n if (!(await import_fs_extra.default.stat(filePath)).isDirectory()) {\n await replaceNameInUTF8File(filePath, projectName, \"bare\");\n }\n if (shouldRenameFile(filePath, placeholderName)) {\n await renameFile(filePath, placeholderName, projectName);\n } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {\n await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (isFullClone) {\n console.info(`\n${import_ansis.default.green.bold(\"Done!\")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:\n \\u2022 ${import_ansis.default.green(\"cd\")} ${projectName}\n\n${import_ansis.default.green(`Run instructions for ${import_ansis.default.bold(\"Android\")}:`)}\n \\u2022 Have an Android emulator running (quickest way to get started), or a device connected.\n \\u2022 npx react-native run-android\n\n${import_ansis.default.blue(`Run instructions for ${import_ansis.default.bold(\"iOS\")}:`)}\n \\u2022 Install Cocoapods\n \\u2022 bundle install # you need to run this only once in your project.\n \\u2022 bundle exec pod install\n \\u2022 cd ..\n\n \\u2022 npx react-native run-ios\n ${import_ansis.default.gray(\"- or -\")}\n \\u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run \"xed -b ios\"\n \\u2022 Hit the Run button\n\n`);\n }\n};\nvar bare_default = main;\n//# sourceMappingURL=bare.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OA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IAAI,WAAW,MAAM;GACrB,IAAI,iBAAiB,QAAQ,GAAG;IAC9B;GACF;GACA,IAAI,EAAE,MAAM,gBAAgB,QAAQ,KAAK,QAAQ,EAAC,CAAE,YAAY,GAAG;IACjE,MAAM,sBAAsB,UAAU,aAAa,MAAM;GAC3D;GACA,IAAI,iBAAiB,UAAU,eAAe,GAAG;IAC/C,MAAM,WAAW,UAAU,iBAAiB,WAAW;GACzD,OAAO,IAAI,iBAAiB,UAAU,gBAAgB,YAAY,CAAC,GAAG;IACpE,MAAM,WAAW,UAAU,gBAAgB,YAAY,GAAG,YAAY,YAAY,CAAC;GACrF;EACF;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,IAAI,aAAa;EACf,QAAQ,KAAK;EACf,aAAa,QAAQ,MAAM,KAAK,OAAO,EAAE,iCAAiC,aAAa,QAAQ,YAAY,WAAW,EAAE;WAC/G,aAAa,QAAQ,MAAM,IAAI,EAAE,GAAG,YAAY;;EAEzD,aAAa,QAAQ,MAAM,wBAAwB,aAAa,QAAQ,KAAK,SAAS,EAAE,EAAE,EAAE;;;;EAI5F,aAAa,QAAQ,KAAK,wBAAwB,aAAa,QAAQ,KAAK,KAAK,EAAE,EAAE,EAAE;;;;;;;IAOrF,aAAa,QAAQ,KAAK,QAAQ,EAAE;gBACxB,YAAY,OAAO,YAAY;;;CAG9C;CACC;AACF;AACA,IAAI,eAAe"}
@@ -1,45 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
26
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
- var fullstack_exports = {};
28
- __export(fullstack_exports, { default: () => fullstack_default });
29
- module.exports = __toCommonJS(fullstack_exports);
30
- var import_ansis = __toESM(require("ansis"));
31
- const packageManager = "yarn";
32
- const useYarn = packageManager === "yarn";
33
- const runCommand = (scriptName) => `${packageManager} ${useYarn ? "" : "run "}${scriptName}`;
34
- const main = async ({ isFullClone, projectName }) => {
35
- if (isFullClone) {
36
- console.info(`
37
- ${import_ansis.default.green.bold("Done!")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:
38
- \u2022 ${import_ansis.default.green("cd")} ${projectName}
39
- `);
40
- }
41
- console.info(`
42
- To start the dev server, run: ${import_ansis.default.green(runCommand("dev"))}
43
- `);
44
- };
45
- var fullstack_default = main;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
14
- };
15
- var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
- value: mod,
26
- enumerable: true
27
- }) : target, mod));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var fullstack_exports = {};
30
- __export(fullstack_exports, { default: () => fullstack_default });
31
- module.exports = __toCommonJS(fullstack_exports);
32
- var import_ansis = __toESM(require("ansis"));
33
- var packageManager = "yarn";
34
- var useYarn = packageManager === "yarn";
35
- var runCommand = function runCommand2(scriptName) {
36
- return `${packageManager} ${useYarn ? "" : "run "}${scriptName}`;
37
- };
38
- var main = async function main2(param) {
39
- var { isFullClone, projectName } = param;
40
- if (isFullClone) {
41
- console.info(`
42
- ${import_ansis.default.green.bold("Done!")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:
43
- \u2022 ${import_ansis.default.green("cd")} ${projectName}
44
- `);
45
- }
46
- console.info(`
47
- To start the dev server, run: ${import_ansis.default.green(runCommand("dev"))}
48
- `);
49
- };
50
- var fullstack_default = main;
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
14
- };
15
- var __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from === "object" || typeof from === "function") {
17
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: () => from[key],
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
25
- value: mod,
26
- enumerable: true
27
- }) : target, mod));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var fullstack_exports = {};
30
- __export(fullstack_exports, { default: () => fullstack_default });
31
- module.exports = __toCommonJS(fullstack_exports);
32
- var import_ansis = __toESM(require("ansis"));
33
- var packageManager = "yarn";
34
- var useYarn = packageManager === "yarn";
35
- var runCommand = function runCommand2(scriptName) {
36
- return `${packageManager} ${useYarn ? "" : "run "}${scriptName}`;
37
- };
38
- var main = async function main2(param) {
39
- var { isFullClone, projectName } = param;
40
- if (isFullClone) {
41
- console.info(`
42
- ${import_ansis.default.green.bold("Done!")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:
43
- \u2022 ${import_ansis.default.green("cd")} ${projectName}
44
- `);
45
- }
46
- console.info(`
47
- To start the dev server, run: ${import_ansis.default.green(runCommand("dev"))}
48
- `);
49
- };
50
- var fullstack_default = main;
51
-
52
- //# sourceMappingURL=fullstack.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fullstack.native.js","names":[],"sources":["cjs/steps/fullstack.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar fullstack_exports = {};\n__export(fullstack_exports, {\n default: () => fullstack_default\n});\nmodule.exports = __toCommonJS(fullstack_exports);\nvar import_ansis = __toESM(require(\"ansis\"));\nvar packageManager = \"yarn\";\nvar useYarn = packageManager === \"yarn\";\nvar runCommand = function runCommand2(scriptName) {\n return `${packageManager} ${useYarn ? \"\" : \"run \"}${scriptName}`;\n};\nvar main = async function main2(param) {\n var { isFullClone, projectName } = param;\n if (isFullClone) {\n console.info(`\n${import_ansis.default.green.bold(\"Done!\")} Created a new project under ./${import_ansis.default.greenBright(projectName)} visit your project:\n \\u2022 ${import_ansis.default.green(\"cd\")} ${projectName}\n`);\n }\n console.info(`\nTo start the dev server, run: ${import_ansis.default.green(runCommand(\"dev\"))}\n`);\n};\nvar fullstack_default = main;\n//# sourceMappingURL=fullstack.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAA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AQ,MAAM,IAAI,EAAE,GAAG,YAAY;CACzD;CACC;CACA,QAAQ,KAAK;gCACiB,aAAa,QAAQ,MAAM,WAAW,KAAK,CAAC,EAAE;CAC7E;AACD;AACA,IAAI,oBAAoB"}
@@ -1,71 +0,0 @@
1
- import ansis from "ansis";
2
- import fs from "fs-extra";
3
- import { basename, dirname, join } from "node:path";
4
-
5
- function shouldIgnoreFile(filePath) {
6
- return filePath.match(/node_modules|yarn.lock|package-lock.json/g);
7
- }
8
- function shouldRenameFile(filePath, nameToReplace) {
9
- return basename(filePath).includes(nameToReplace);
10
- }
11
- async function renameFile(filePath, oldName, newName) {
12
- const newFileName = join(dirname(filePath), basename(filePath).replace(new RegExp(oldName, "g"), newName));
13
- await fs.rename(filePath, newFileName);
14
- }
15
- function walk(current) {
16
- if (!fs.lstatSync(current).isDirectory()) {
17
- return [current];
18
- }
19
- const files = fs.readdirSync(current).map((child) => walk(join(current, child)));
20
- const result = [];
21
- return result.concat.apply([current], files);
22
- }
23
- async function replaceNameInUTF8File(filePath, projectName, templateName) {
24
- const fileContent = await fs.readFile(filePath, "utf8");
25
- const replacedFileContent = fileContent.replace(new RegExp(templateName, "g"), projectName).replace(new RegExp(templateName.toLowerCase(), "g"), projectName.toLowerCase());
26
- if (fileContent !== replacedFileContent) {
27
- await fs.writeFile(filePath, replacedFileContent, "utf8");
28
- }
29
- }
30
- const main = async ({ isFullClone, projectName }) => {
31
- const placeholderName = "bare";
32
- for (const filePath of walk(process.cwd()).reverse()) {
33
- if (shouldIgnoreFile(filePath)) {
34
- continue;
35
- }
36
- if (!(await fs.stat(filePath)).isDirectory()) {
37
- await replaceNameInUTF8File(filePath, projectName, "bare");
38
- }
39
- if (shouldRenameFile(filePath, placeholderName)) {
40
- await renameFile(filePath, placeholderName, projectName);
41
- } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {
42
- await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());
43
- }
44
- }
45
- if (isFullClone) {
46
- console.info(`
47
- ${ansis.green.bold("Done!")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:
48
- \u2022 ${ansis.green("cd")} ${projectName}
49
-
50
- ${ansis.green(`Run instructions for ${ansis.bold("Android")}:`)}
51
- \u2022 Have an Android emulator running (quickest way to get started), or a device connected.
52
- \u2022 npx react-native run-android
53
-
54
- ${ansis.blue(`Run instructions for ${ansis.bold("iOS")}:`)}
55
- \u2022 Install Cocoapods
56
- \u2022 bundle install # you need to run this only once in your project.
57
- \u2022 bundle exec pod install
58
- \u2022 cd ..
59
-
60
- \u2022 npx react-native run-ios
61
- ${ansis.gray("- or -")}
62
- \u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run "xed -b ios"
63
- \u2022 Hit the Run button
64
-
65
- `);
66
- }
67
- };
68
- var bare_default = main;
69
-
70
- export { bare_default as default, replaceNameInUTF8File };
71
- //# sourceMappingURL=bare.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bare.js","names":[],"sources":["esm/steps/bare.js"],"sourcesContent":["import ansis from \"ansis\";\nimport fs from \"fs-extra\";\nimport { basename, dirname, join } from \"node:path\";\nfunction shouldIgnoreFile(filePath) {\n return filePath.match(/node_modules|yarn.lock|package-lock.json/g);\n}\nfunction shouldRenameFile(filePath, nameToReplace) {\n return basename(filePath).includes(nameToReplace);\n}\nasync function renameFile(filePath, oldName, newName) {\n const newFileName = join(\n dirname(filePath),\n basename(filePath).replace(new RegExp(oldName, \"g\"), newName)\n );\n await fs.rename(filePath, newFileName);\n}\nfunction walk(current) {\n if (!fs.lstatSync(current).isDirectory()) {\n return [current];\n }\n const files = fs.readdirSync(current).map((child) => walk(join(current, child)));\n const result = [];\n return result.concat.apply([current], files);\n}\nasync function replaceNameInUTF8File(filePath, projectName, templateName) {\n const fileContent = await fs.readFile(filePath, \"utf8\");\n const replacedFileContent = fileContent.replace(new RegExp(templateName, \"g\"), projectName).replace(new RegExp(templateName.toLowerCase(), \"g\"), projectName.toLowerCase());\n if (fileContent !== replacedFileContent) {\n await fs.writeFile(filePath, replacedFileContent, \"utf8\");\n }\n}\nconst main = async ({ isFullClone, projectName }) => {\n const placeholderName = \"bare\";\n for (const filePath of walk(process.cwd()).reverse()) {\n if (shouldIgnoreFile(filePath)) {\n continue;\n }\n if (!(await fs.stat(filePath)).isDirectory()) {\n await replaceNameInUTF8File(filePath, projectName, \"bare\");\n }\n if (shouldRenameFile(filePath, placeholderName)) {\n await renameFile(filePath, placeholderName, projectName);\n } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {\n await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());\n }\n }\n if (isFullClone) {\n console.info(`\n${ansis.green.bold(\"Done!\")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:\n \\u2022 ${ansis.green(\"cd\")} ${projectName}\n\n${ansis.green(`Run instructions for ${ansis.bold(\"Android\")}:`)}\n \\u2022 Have an Android emulator running (quickest way to get started), or a device connected.\n \\u2022 npx react-native run-android\n\n${ansis.blue(`Run instructions for ${ansis.bold(\"iOS\")}:`)}\n \\u2022 Install Cocoapods\n \\u2022 bundle install # you need to run this only once in your project.\n \\u2022 bundle exec pod install\n \\u2022 cd ..\n\n \\u2022 npx react-native run-ios\n ${ansis.gray(\"- or -\")}\n \\u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run \"xed -b ios\"\n \\u2022 Hit the Run button\n\n`);\n }\n};\nvar bare_default = main;\nexport {\n bare_default as default,\n replaceNameInUTF8File\n};\n//# sourceMappingURL=bare.js.map\n"],"mappings":";;;;;AAGA,SAAS,iBAAiB,UAAU;CAClC,OAAO,SAAS,MAAM,2CAA2C;AACnE;AACA,SAAS,iBAAiB,UAAU,eAAe;CACjD,OAAO,SAAS,QAAQ,CAAC,CAAC,SAAS,aAAa;AAClD;AACA,eAAe,WAAW,UAAU,SAAS,SAAS;CACpD,MAAM,cAAc,KAClB,QAAQ,QAAQ,GAChB,SAAS,QAAQ,CAAC,CAAC,QAAQ,IAAI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KAAK;EACf,MAAM,MAAM,KAAK,OAAO,EAAE,iCAAiC,MAAM,YAAY,WAAW,EAAE;WACjF,MAAM,MAAM,IAAI,EAAE,GAAG,YAAY;;EAE1C,MAAM,MAAM,wBAAwB,MAAM,KAAK,SAAS,EAAE,EAAE,EAAE;;;;EAI9D,MAAM,KAAK,wBAAwB,MAAM,KAAK,KAAK,EAAE,EAAE,EAAE;;;;;;;IAOvD,MAAM,KAAK,QAAQ,EAAE;gBACT,YAAY,OAAO,YAAY;;;CAG9C;CACC;AACF;AACA,IAAI,eAAe"}
@@ -1,91 +0,0 @@
1
- import ansis from "ansis";
2
- import fs from "fs-extra";
3
- import { basename, dirname, join } from "path";
4
-
5
- function shouldIgnoreFile(filePath) {
6
- return filePath.match(/node_modules|yarn.lock|package-lock.json/g);
7
- }
8
- function shouldRenameFile(filePath, nameToReplace) {
9
- return basename(filePath).includes(nameToReplace);
10
- }
11
- async function renameFile(filePath, oldName, newName) {
12
- var newFileName = join(dirname(filePath), basename(filePath).replace(new RegExp(oldName, "g"), newName));
13
- await fs.rename(filePath, newFileName);
14
- }
15
- function walk(current) {
16
- if (!fs.lstatSync(current).isDirectory()) {
17
- return [current];
18
- }
19
- var files = fs.readdirSync(current).map(function(child) {
20
- return walk(join(current, child));
21
- });
22
- var result = [];
23
- return result.concat.apply([current], files);
24
- }
25
- async function replaceNameInUTF8File(filePath, projectName, templateName) {
26
- var fileContent = await fs.readFile(filePath, "utf8");
27
- var replacedFileContent = fileContent.replace(new RegExp(templateName, "g"), projectName).replace(new RegExp(templateName.toLowerCase(), "g"), projectName.toLowerCase());
28
- if (fileContent !== replacedFileContent) {
29
- await fs.writeFile(filePath, replacedFileContent, "utf8");
30
- }
31
- }
32
- var main = async function main2(param) {
33
- var { isFullClone, projectName } = param;
34
- var placeholderName = "bare";
35
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
36
- try {
37
- for (var _iterator = walk(process.cwd()).reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
38
- var filePath = _step.value;
39
- if (shouldIgnoreFile(filePath)) {
40
- continue;
41
- }
42
- if (!(await fs.stat(filePath)).isDirectory()) {
43
- await replaceNameInUTF8File(filePath, projectName, "bare");
44
- }
45
- if (shouldRenameFile(filePath, placeholderName)) {
46
- await renameFile(filePath, placeholderName, projectName);
47
- } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {
48
- await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());
49
- }
50
- }
51
- } catch (err) {
52
- _didIteratorError = true;
53
- _iteratorError = err;
54
- } finally {
55
- try {
56
- if (!_iteratorNormalCompletion && _iterator.return != null) {
57
- _iterator.return();
58
- }
59
- } finally {
60
- if (_didIteratorError) {
61
- throw _iteratorError;
62
- }
63
- }
64
- }
65
- if (isFullClone) {
66
- console.info(`
67
- ${ansis.green.bold("Done!")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:
68
- \u2022 ${ansis.green("cd")} ${projectName}
69
-
70
- ${ansis.green(`Run instructions for ${ansis.bold("Android")}:`)}
71
- \u2022 Have an Android emulator running (quickest way to get started), or a device connected.
72
- \u2022 npx react-native run-android
73
-
74
- ${ansis.blue(`Run instructions for ${ansis.bold("iOS")}:`)}
75
- \u2022 Install Cocoapods
76
- \u2022 bundle install # you need to run this only once in your project.
77
- \u2022 bundle exec pod install
78
- \u2022 cd ..
79
-
80
- \u2022 npx react-native run-ios
81
- ${ansis.gray("- or -")}
82
- \u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run "xed -b ios"
83
- \u2022 Hit the Run button
84
-
85
- `);
86
- }
87
- };
88
- var bare_default = main;
89
-
90
- export { bare_default as default, replaceNameInUTF8File };
91
- //# sourceMappingURL=bare.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bare.native.js","names":[],"sources":["esm/steps/bare.native.js"],"sourcesContent":["import ansis from \"ansis\";\nimport fs from \"fs-extra\";\nimport { basename, dirname, join } from \"path\";\nfunction shouldIgnoreFile(filePath) {\n return filePath.match(/node_modules|yarn.lock|package-lock.json/g);\n}\nfunction shouldRenameFile(filePath, nameToReplace) {\n return basename(filePath).includes(nameToReplace);\n}\nasync function renameFile(filePath, oldName, newName) {\n var newFileName = join(dirname(filePath), basename(filePath).replace(new RegExp(oldName, \"g\"), newName));\n await fs.rename(filePath, newFileName);\n}\nfunction walk(current) {\n if (!fs.lstatSync(current).isDirectory()) {\n return [\n current\n ];\n }\n var files = fs.readdirSync(current).map(function(child) {\n return walk(join(current, child));\n });\n var result = [];\n return result.concat.apply([\n current\n ], files);\n}\nasync function replaceNameInUTF8File(filePath, projectName, templateName) {\n var fileContent = await fs.readFile(filePath, \"utf8\");\n var replacedFileContent = fileContent.replace(new RegExp(templateName, \"g\"), projectName).replace(new RegExp(templateName.toLowerCase(), \"g\"), projectName.toLowerCase());\n if (fileContent !== replacedFileContent) {\n await fs.writeFile(filePath, replacedFileContent, \"utf8\");\n }\n}\nvar main = async function main2(param) {\n var { isFullClone, projectName } = param;\n var placeholderName = \"bare\";\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = walk(process.cwd()).reverse()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var filePath = _step.value;\n if (shouldIgnoreFile(filePath)) {\n continue;\n }\n if (!(await fs.stat(filePath)).isDirectory()) {\n await replaceNameInUTF8File(filePath, projectName, \"bare\");\n }\n if (shouldRenameFile(filePath, placeholderName)) {\n await renameFile(filePath, placeholderName, projectName);\n } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {\n await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase());\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (isFullClone) {\n console.info(`\n${ansis.green.bold(\"Done!\")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:\n \\u2022 ${ansis.green(\"cd\")} ${projectName}\n\n${ansis.green(`Run instructions for ${ansis.bold(\"Android\")}:`)}\n \\u2022 Have an Android emulator running (quickest way to get started), or a device connected.\n \\u2022 npx react-native run-android\n\n${ansis.blue(`Run instructions for ${ansis.bold(\"iOS\")}:`)}\n \\u2022 Install Cocoapods\n \\u2022 bundle install # you need to run this only once in your project.\n \\u2022 bundle exec pod install\n \\u2022 cd ..\n\n \\u2022 npx react-native run-ios\n ${ansis.gray(\"- or -\")}\n \\u2022 Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run \"xed -b ios\"\n \\u2022 Hit the Run button\n\n`);\n }\n};\nvar bare_default = main;\nexport {\n bare_default as default,\n replaceNameInUTF8File\n};\n//# sourceMappingURL=bare.js.map\n"],"mappings":";;;;;AAGA,SAAS,iBAAiB,UAAU;CAClC,OAAO,SAAS,MAAM,2CAA2C;AACnE;AACA,SAAS,iBAAiB,UAAU,eAAe;CACjD,OAAO,SAAS,QAAQ,CAAC,CAAC,SAAS,aAAa;AAClD;AACA,eAAe,WAAW,UAAU,SAAS,SAAS;CACpD,IAAI,cAAc,KAAK,QAAQ,QAAQ,GAAG,SAAS,QAAQ,CAAC,CAAC,QAAQ,IAAI,OAAO,SAAS,GAAG,GAAG,OAAO,CAAC;CACvG,MAAM,GAAG,OAAO,UAAU,WAAW;AACvC;AACA,SAAS,KAAK,SAAS;CACrB,IAAI,CAAC,GAAG,UAAU,OAAO,CAAC,CAAC,YAAY,GAAG;EACxC,OAAO,CACL,OACF;CACF;CACA,IAAI,QAAQ,GAAG,YAAY,OAAO,CAAC,CAAC,IAAI,SAAS,OAAO;EACtD,OAAO,KAAK,KAAK,SAAS,KAAK,CAAC;CAClC,CAAC;CACD,IAAI,SAAS,CAAC;CACd,OAAO,OAAO,OAAO,MAAM,CACzB,OACF,GAAG,K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;GACR;EACF;CACF;CACA,IAAI,aAAa;EACf,QAAQ,KAAK;EACf,MAAM,MAAM,KAAK,OAAO,EAAE,iCAAiC,MAAM,YAAY,WAAW,EAAE;WACjF,MAAM,MAAM,IAAI,EAAE,GAAG,YAAY;;EAE1C,MAAM,MAAM,wBAAwB,MAAM,KAAK,SAAS,EAAE,EAAE,EAAE;;;;EAI9D,MAAM,KAAK,wBAAwB,MAAM,KAAK,KAAK,EAAE,EAAE,EAAE;;;;;;;IAOvD,MAAM,KAAK,QAAQ,EAAE;gBACT,YAAY,OAAO,YAAY;;;CAG9C;CACC;AACF;AACA,IAAI,eAAe"}
@@ -1,20 +0,0 @@
1
- import ansis from "ansis";
2
-
3
- const packageManager = "yarn";
4
- const useYarn = packageManager === "yarn";
5
- const runCommand = (scriptName) => `${packageManager} ${useYarn ? "" : "run "}${scriptName}`;
6
- const main = async ({ isFullClone, projectName }) => {
7
- if (isFullClone) {
8
- console.info(`
9
- ${ansis.green.bold("Done!")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:
10
- \u2022 ${ansis.green("cd")} ${projectName}
11
- `);
12
- }
13
- console.info(`
14
- To start the dev server, run: ${ansis.green(runCommand("dev"))}
15
- `);
16
- };
17
- var fullstack_default = main;
18
-
19
- export { fullstack_default as default };
20
- //# sourceMappingURL=fullstack.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fullstack.js","names":[],"sources":["esm/steps/fullstack.js"],"sourcesContent":["import ansis from \"ansis\";\nconst packageManager = \"yarn\";\nconst useYarn = packageManager === \"yarn\";\nconst runCommand = (scriptName) => `${packageManager} ${useYarn ? \"\" : \"run \"}${scriptName}`;\nconst main = async ({ isFullClone, projectName }) => {\n if (isFullClone) {\n console.info(`\n${ansis.green.bold(\"Done!\")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:\n \\u2022 ${ansis.green(\"cd\")} ${projectName}\n`);\n }\n console.info(`\nTo start the dev server, run: ${ansis.green(runCommand(\"dev\"))}\n`);\n};\nvar fullstack_default = main;\nexport {\n fullstack_default as default\n};\n//# sourceMappingURL=fullstack.js.map\n"],"mappings":";;;AACA,MAAM,iBAAiB;AACvB,MAAM,UAAU,mBAAmB;AACnC,MAAM,cAAc,eAAe,GAAG,eAAe,GAAG,UAAU,KAAK,SAAS;AAChF,MAAM,OAAO,OAAO,EAAE,aAAa,kBAAkB;CACnD,IAAI,aAAa;EACf,QAAQ,KAAK;EACf,MAAM,MAAM,KAAK,OAAO,EAAE,iCAAiC,MAAM,YAAY,WAAW,EAAE;UAClF,MAAM,MAAM,IAAI,EAAE,GAAG,YAAY;CAC1C;CACC;CACA,QAAQ,KAAK;gCACiB,MAAM,MAAM,WAAW,KAAK,CAAC,EAAE;CAC9D;AACD;AACA,IAAI,oBAAoB"}
@@ -1,23 +0,0 @@
1
- import ansis from "ansis";
2
-
3
- var packageManager = "yarn";
4
- var useYarn = packageManager === "yarn";
5
- var runCommand = function runCommand2(scriptName) {
6
- return `${packageManager} ${useYarn ? "" : "run "}${scriptName}`;
7
- };
8
- var main = async function main2(param) {
9
- var { isFullClone, projectName } = param;
10
- if (isFullClone) {
11
- console.info(`
12
- ${ansis.green.bold("Done!")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:
13
- \u2022 ${ansis.green("cd")} ${projectName}
14
- `);
15
- }
16
- console.info(`
17
- To start the dev server, run: ${ansis.green(runCommand("dev"))}
18
- `);
19
- };
20
- var fullstack_default = main;
21
-
22
- export { fullstack_default as default };
23
- //# sourceMappingURL=fullstack.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fullstack.native.js","names":[],"sources":["esm/steps/fullstack.native.js"],"sourcesContent":["import ansis from \"ansis\";\nvar packageManager = \"yarn\";\nvar useYarn = packageManager === \"yarn\";\nvar runCommand = function runCommand2(scriptName) {\n return `${packageManager} ${useYarn ? \"\" : \"run \"}${scriptName}`;\n};\nvar main = async function main2(param) {\n var { isFullClone, projectName } = param;\n if (isFullClone) {\n console.info(`\n${ansis.green.bold(\"Done!\")} Created a new project under ./${ansis.greenBright(projectName)} visit your project:\n \\u2022 ${ansis.green(\"cd\")} ${projectName}\n`);\n }\n console.info(`\nTo start the dev server, run: ${ansis.green(runCommand(\"dev\"))}\n`);\n};\nvar fullstack_default = main;\nexport {\n fullstack_default as default\n};\n//# sourceMappingURL=fullstack.js.map\n"],"mappings":";;;AACA,IAAI,iBAAiB;AACrB,IAAI,UAAU,mBAAmB;AACjC,IAAI,aAAa,SAAS,YAAY,YAAY;CAChD,OAAO,GAAG,eAAe,GAAG,UAAU,KAAK,SAAS;AACtD;AACA,IAAI,OAAO,eAAe,MAAM,OAAO;CACrC,IAAI,EAAE,aAAa,gBAAgB;CACnC,IAAI,aAAa;EACf,QAAQ,KAAK;EACf,MAAM,MAAM,KAAK,OAAO,EAAE,iCAAiC,MAAM,YAAY,WAAW,EAAE;UAClF,MAAM,MAAM,IAAI,EAAE,GAAG,YAAY;CAC1C;CACC;CACA,QAAQ,KAAK;gCACiB,MAAM,MAAM,WAAW,KAAK,CAAC,EAAE;CAC9D;AACD;AACA,IAAI,oBAAoB"}
package/src/steps/bare.ts DELETED
@@ -1,91 +0,0 @@
1
- import ansis from 'ansis'
2
- import fs from 'fs-extra'
3
- import { basename, dirname, join } from 'node:path'
4
- import type { ExtraSteps } from './types'
5
-
6
- function shouldIgnoreFile(filePath: string) {
7
- return filePath.match(/node_modules|yarn.lock|package-lock.json/g)
8
- }
9
-
10
- function shouldRenameFile(filePath: string, nameToReplace: string) {
11
- return basename(filePath).includes(nameToReplace)
12
- }
13
-
14
- async function renameFile(filePath: string, oldName: string, newName: string) {
15
- const newFileName = join(
16
- dirname(filePath),
17
- basename(filePath).replace(new RegExp(oldName, 'g'), newName)
18
- )
19
-
20
- await fs.rename(filePath, newFileName)
21
- }
22
-
23
- function walk(current: string): string[] {
24
- if (!fs.lstatSync(current).isDirectory()) {
25
- return [current]
26
- }
27
-
28
- const files = fs.readdirSync(current).map((child) => walk(join(current, child)))
29
- const result: string[] = []
30
- return result.concat.apply([current], files)
31
- }
32
-
33
- export async function replaceNameInUTF8File(
34
- filePath: string,
35
- projectName: string,
36
- templateName: string
37
- ) {
38
- const fileContent = await fs.readFile(filePath, 'utf8')
39
- const replacedFileContent = fileContent
40
- .replace(new RegExp(templateName, 'g'), projectName)
41
- .replace(new RegExp(templateName.toLowerCase(), 'g'), projectName.toLowerCase())
42
-
43
- if (fileContent !== replacedFileContent) {
44
- await fs.writeFile(filePath, replacedFileContent, 'utf8')
45
- }
46
- }
47
-
48
- const main: ExtraSteps = async ({ isFullClone, projectName }) => {
49
- const placeholderName = 'bare'
50
-
51
- for (const filePath of walk(process.cwd()).reverse()) {
52
- if (shouldIgnoreFile(filePath)) {
53
- continue
54
- }
55
-
56
- if (!(await fs.stat(filePath)).isDirectory()) {
57
- await replaceNameInUTF8File(filePath, projectName, 'bare')
58
- }
59
-
60
- if (shouldRenameFile(filePath, placeholderName)) {
61
- await renameFile(filePath, placeholderName, projectName)
62
- } else if (shouldRenameFile(filePath, placeholderName.toLowerCase())) {
63
- await renameFile(filePath, placeholderName.toLowerCase(), projectName.toLowerCase())
64
- }
65
- }
66
-
67
- if (isFullClone) {
68
- console.info(`
69
- ${ansis.green.bold('Done!')} Created a new project under ./${ansis.greenBright(projectName)} visit your project:
70
- • ${ansis.green('cd')} ${projectName}
71
-
72
- ${ansis.green(`Run instructions for ${ansis.bold('Android')}:`)}
73
- • Have an Android emulator running (quickest way to get started), or a device connected.
74
- • npx react-native run-android
75
-
76
- ${ansis.blue(`Run instructions for ${ansis.bold('iOS')}:`)}
77
- • Install Cocoapods
78
- • bundle install # you need to run this only once in your project.
79
- • bundle exec pod install
80
- • cd ..
81
-
82
- • npx react-native run-ios
83
- ${ansis.gray('- or -')}
84
- • Open ${projectName}/ios/${projectName}.xcworkspace in Xcode or run "xed -b ios"
85
- • Hit the Run button
86
-
87
- `)
88
- }
89
- }
90
-
91
- export default main
@@ -1,23 +0,0 @@
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) =>
9
- `${packageManager} ${useYarn ? '' : 'run '}${scriptName}`
10
-
11
- const main: ExtraSteps = async ({ isFullClone, projectName }) => {
12
- if (isFullClone) {
13
- console.info(`
14
- ${ansis.green.bold('Done!')} Created a new project under ./${ansis.greenBright(projectName)} visit your project:
15
- • ${ansis.green('cd')} ${projectName}
16
- `)
17
- }
18
- console.info(`
19
- To start the dev server, run: ${ansis.green(runCommand('dev'))}
20
- `)
21
- }
22
-
23
- export default main
@@ -1,5 +0,0 @@
1
- import type { ExtraSteps } from './types';
2
- export declare function replaceNameInUTF8File(filePath: string, projectName: string, templateName: string): Promise<void>;
3
- declare const main: ExtraSteps;
4
- export default main;
5
- //# sourceMappingURL=bare.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bare.d.ts","sourceRoot":"","sources":["../../src/steps/bare.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AA6BzC,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,iBAUrB;AAED,QAAA,MAAM,IAAI,EAAE,UAyCX,CAAA;eAEc,IAAI"}
@@ -1,4 +0,0 @@
1
- import type { ExtraSteps } from './types';
2
- declare const main: ExtraSteps;
3
- export default main;
4
- //# sourceMappingURL=fullstack.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fullstack.d.ts","sourceRoot":"","sources":["../../src/steps/fullstack.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAQzC,QAAA,MAAM,IAAI,EAAE,UAUX,CAAA;eAEc,IAAI"}