@inglorious/create-game 1.1.0 → 1.1.2
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/README.md +1 -8
- package/bin/index.js +2 -7
- package/package.json +1 -1
- package/templates/ijs/gitignore +3 -0
- package/templates/ijs/package.json +2 -2
- package/templates/its/gitignore +3 -0
- package/templates/its/package.json +2 -2
- package/templates/its/vite.config.js +0 -1
- package/templates/js/gitignore +3 -0
- package/templates/js/package.json +2 -2
- package/templates/ts/gitignore +3 -0
- package/templates/ts/package.json +2 -2
- package/templates/ts/vite.config.js +0 -1
package/README.md
CHANGED
|
@@ -8,16 +8,9 @@ This package allows you to generate a new project from a set of pre-configured t
|
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
|
-
To create a new game, run
|
|
11
|
+
To create a new game, run this command in your terminal. You will be prompted to choose a project name and select a template.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
# with npm
|
|
15
|
-
npm create @inglorious/game@latest
|
|
16
|
-
|
|
17
|
-
# with yarn
|
|
18
|
-
yarn create @inglorious/game
|
|
19
|
-
|
|
20
|
-
# with pnpm
|
|
21
14
|
pnpm create @inglorious/game
|
|
22
15
|
```
|
|
23
16
|
|
package/bin/index.js
CHANGED
|
@@ -94,10 +94,8 @@ async function main() {
|
|
|
94
94
|
const targetDir = path.join(process.cwd(), projectName)
|
|
95
95
|
const templateDir = path.join(templatesRoot, template)
|
|
96
96
|
|
|
97
|
-
// Create project directory and copy template files
|
|
98
97
|
copyDir(templateDir, targetDir)
|
|
99
98
|
|
|
100
|
-
// Update README.md with project name
|
|
101
99
|
const readmePath = path.join(targetDir, "README.md")
|
|
102
100
|
if (fs.existsSync(readmePath)) {
|
|
103
101
|
let readme = fs.readFileSync(readmePath, "utf-8")
|
|
@@ -111,7 +109,6 @@ async function main() {
|
|
|
111
109
|
console.log(` cd ${projectName}`)
|
|
112
110
|
console.log(` Open index.html in your browser`)
|
|
113
111
|
} else {
|
|
114
|
-
// Update package.json with project name
|
|
115
112
|
const pkgPath = path.join(targetDir, "package.json")
|
|
116
113
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8"))
|
|
117
114
|
pkg.name = projectName
|
|
@@ -156,7 +153,6 @@ async function main() {
|
|
|
156
153
|
const srcPath = path.join(src, entry.name)
|
|
157
154
|
const destPath = path.join(dest, entry.name)
|
|
158
155
|
|
|
159
|
-
// Rename gitignore to .gitignore
|
|
160
156
|
if (entry.name === "gitignore") {
|
|
161
157
|
fs.copyFileSync(srcPath, path.join(dest, ".gitignore"))
|
|
162
158
|
continue
|
|
@@ -170,7 +166,6 @@ async function main() {
|
|
|
170
166
|
}
|
|
171
167
|
}
|
|
172
168
|
|
|
173
|
-
// The skills CLI asks which agents to install the skills for.
|
|
174
169
|
function installSkills(targetDir) {
|
|
175
170
|
try {
|
|
176
171
|
execSync(SKILLS_COMMAND, { cwd: targetDir, stdio: "inherit" })
|
|
@@ -184,11 +179,11 @@ async function main() {
|
|
|
184
179
|
try {
|
|
185
180
|
const version = execSync(`npm view ${packageName} version`, {
|
|
186
181
|
encoding: "utf-8",
|
|
187
|
-
stdio: "pipe",
|
|
182
|
+
stdio: "pipe",
|
|
188
183
|
}).trim()
|
|
189
184
|
return `^${version}`
|
|
190
185
|
} catch {
|
|
191
|
-
return "latest"
|
|
186
|
+
return "latest"
|
|
192
187
|
}
|
|
193
188
|
}
|
|
194
189
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/create-game",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "A scaffolding tool to quickly create a new game with the Inglorious Engine.",
|
|
5
5
|
"author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
package/templates/ijs/gitignore
CHANGED
package/templates/its/gitignore
CHANGED
package/templates/js/gitignore
CHANGED
package/templates/ts/gitignore
CHANGED