@rollipop/init 0.1.0-alpha.12 → 0.1.0-alpha.14
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/CHANGELOG.md +4 -0
- package/dist/index.js +11 -11
- package/package.json +17 -17
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,11 +16,11 @@ const logger = {
|
|
|
16
16
|
console.error(pc.red("✗"), `${message}: ${reason instanceof Error ? reason.message : String(reason)}`);
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
-
async function findAppBuildGradle(cwd
|
|
20
|
-
const files = await glob("**/android/app/build.gradle", { cwd
|
|
19
|
+
async function findAppBuildGradle(cwd) {
|
|
20
|
+
const files = await glob("**/android/app/build.gradle", { cwd });
|
|
21
21
|
if (files.length === 0) throw new Error("No Android build.gradle found");
|
|
22
22
|
if (files.length > 1) throw new Error("Multiple Android build.gradle found:\n" + files.join("\n"));
|
|
23
|
-
return path.join(cwd
|
|
23
|
+
return path.join(cwd, files[0]);
|
|
24
24
|
}
|
|
25
25
|
async function updateGradleCLIPath(appBuildGradlePath) {
|
|
26
26
|
const appBuildGradleLines = fs.readFileSync(appBuildGradlePath, "utf8").split("\n");
|
|
@@ -33,8 +33,8 @@ async function updateGradleCLIPath(appBuildGradlePath) {
|
|
|
33
33
|
...appBuildGradleLines.slice(index + 1)
|
|
34
34
|
].join("\n"));
|
|
35
35
|
}
|
|
36
|
-
async function findXCodeProject(cwd
|
|
37
|
-
const basePath = path.join(cwd
|
|
36
|
+
async function findXCodeProject(cwd) {
|
|
37
|
+
const basePath = path.join(cwd, "ios");
|
|
38
38
|
const files = await glob("**/*.xcodeproj/project.pbxproj", {
|
|
39
39
|
cwd: basePath,
|
|
40
40
|
ignore: ["Pods/**"]
|
|
@@ -61,14 +61,14 @@ function updateXCodeCLIPath(xcodeProjectPath) {
|
|
|
61
61
|
buildPhase[1].shellScript = JSON.stringify(newShellScript);
|
|
62
62
|
fs.writeFileSync(project.filepath, project.writeSync());
|
|
63
63
|
}
|
|
64
|
-
async function setupAndroid(cwd
|
|
65
|
-
await updateGradleCLIPath(await findAppBuildGradle(cwd
|
|
64
|
+
async function setupAndroid(cwd) {
|
|
65
|
+
await updateGradleCLIPath(await findAppBuildGradle(cwd));
|
|
66
66
|
}
|
|
67
|
-
async function setupIos(cwd
|
|
68
|
-
updateXCodeCLIPath(await findXCodeProject(cwd
|
|
67
|
+
async function setupIos(cwd) {
|
|
68
|
+
updateXCodeCLIPath(await findXCodeProject(cwd));
|
|
69
69
|
}
|
|
70
|
-
function setupPackage(cwd
|
|
71
|
-
const packageJsonPath = path.join(cwd
|
|
70
|
+
function setupPackage(cwd) {
|
|
71
|
+
const packageJsonPath = path.join(cwd, "package.json");
|
|
72
72
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
73
73
|
packageJson.devDependencies = {
|
|
74
74
|
...packageJson.devDependencies,
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rollipop/init",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
"version": "0.1.0-alpha.14",
|
|
4
|
+
"homepage": "https://github.com/leegeunhyeok/rollipop#readme",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/leegeunhyeok/rollipop/issues"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"author": "leegeunhyeok <dev.ghlee@gmail.com> (https://github.com/leegeunhyeok)",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/leegeunhyeok/rollipop.git",
|
|
13
13
|
"directory": "packages/core"
|
|
14
14
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"
|
|
15
|
+
"bin": "./bin/index.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"bin",
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"type": "module",
|
|
21
21
|
"scripts": {
|
|
22
|
-
"execute": "
|
|
22
|
+
"execute": "node --import @oxc-node/core/register src/index.ts",
|
|
23
23
|
"prepack": "yarn build",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
25
|
"test": "vitest --run --passWithNoTests",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"xcode": "^3.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
35
|
+
"@oxc-node/core": "^0.0.35",
|
|
36
|
+
"tsdown": "0.20.3",
|
|
37
37
|
"typescript": "5.9.3",
|
|
38
|
-
"vitest": "4.0.
|
|
38
|
+
"vitest": "4.0.18"
|
|
39
39
|
}
|
|
40
40
|
}
|