create-threenative 0.2.0 → 0.2.1
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/dist/index.js +3 -2
- package/package.json +1 -1
- package/templates/action-rpg/package.json +1 -1
- package/templates/defense/package.json +1 -1
- package/templates/minimal/package.json +1 -1
- package/templates/platformer/package.json +1 -1
- package/templates/racing/package.json +1 -1
- package/templates/shooter/package.json +1 -1
- package/templates/starter/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from 'child_process';
|
|
3
|
-
import { readdirSync, readFileSync } from 'fs';
|
|
3
|
+
import { existsSync, realpathSync, readdirSync, readFileSync } from 'fs';
|
|
4
4
|
import { mkdir, cp, readdir, readFile, writeFile } from 'fs/promises';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
@@ -272,7 +272,8 @@ async function main() {
|
|
|
272
272
|
process.stdout.write("Skipped install (--no-install). Run pnpm install, then pnpm dev.\n");
|
|
273
273
|
else process.stdout.write("Next: cd into the project and run pnpm dev.\n");
|
|
274
274
|
}
|
|
275
|
-
|
|
275
|
+
var entryPath = process.argv[1];
|
|
276
|
+
if (entryPath !== void 0 && existsSync(entryPath) && realpathSync(path.resolve(entryPath)) === realpathSync(fileURLToPath(import.meta.url))) {
|
|
276
277
|
main().catch((error) => {
|
|
277
278
|
process.stderr.write(`${error instanceof Error ? error.message : String(error)}
|
|
278
279
|
`);
|
package/package.json
CHANGED