@lamppost/create-ink-player 1.0.6 → 1.0.8
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/index.js +14 -3
- package/package.json +1 -1
- package/template/_gitignore +8 -0
- package/template/rsbuild.config.ts +1 -1
package/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
cpSync,
|
|
5
5
|
existsSync,
|
|
6
6
|
mkdirSync,
|
|
7
|
+
renameSync,
|
|
7
8
|
readFileSync,
|
|
8
9
|
rmSync,
|
|
9
10
|
writeFileSync,
|
|
@@ -79,9 +80,9 @@ async function main() {
|
|
|
79
80
|
console.log("Copying template files...");
|
|
80
81
|
cpSync(templateDir, targetDir, { recursive: true });
|
|
81
82
|
|
|
82
|
-
//
|
|
83
|
-
const gitignorePath = join(
|
|
84
|
-
|
|
83
|
+
// Rename _gitignore to .gitignore file
|
|
84
|
+
const gitignorePath = join(targetDir, "_gitignore");
|
|
85
|
+
renameSync(gitignorePath, join(targetDir, ".gitignore"));
|
|
85
86
|
|
|
86
87
|
// Delete the node_modules directory, if it exists
|
|
87
88
|
if (existsSync(join(targetDir, "node_modules"))) {
|
|
@@ -123,6 +124,16 @@ async function main() {
|
|
|
123
124
|
process.exit(1);
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
// Run pnpm update-ink-player
|
|
128
|
+
try {
|
|
129
|
+
execSync("pnpm update-ink-player", {
|
|
130
|
+
cwd: targetDir,
|
|
131
|
+
stdio: "inherit",
|
|
132
|
+
});
|
|
133
|
+
} catch (error) {
|
|
134
|
+
console.error("Error updating ink-player:", error.message);
|
|
135
|
+
}
|
|
136
|
+
|
|
126
137
|
console.log(`\n${gameName} setup complete!`);
|
|
127
138
|
console.log(`\nTo get started:`);
|
|
128
139
|
console.log(` cd ${directoryName}`);
|
package/package.json
CHANGED