diff --git a/examples/dojo-starter b/examples/dojo-starter new file mode 120000 index 00000000..a44fdc1b --- /dev/null +++ b/examples/dojo-starter @@ -0,0 +1 @@ +../worlds/dojo-starter/ \ No newline at end of file diff --git a/examples/example-nodejs-bot/dojoConfig.ts b/examples/example-nodejs-bot/dojoConfig.ts index 08ace85a..2ebe3789 100644 --- a/examples/example-nodejs-bot/dojoConfig.ts +++ b/examples/example-nodejs-bot/dojoConfig.ts @@ -1,4 +1,4 @@ -import manifest from "../../worlds/dojo-starter/manifest_dev.json" assert { type: "json" }; +import manifest from "../dojo-starter/manifest_dev.json" assert { type: "json" }; import { createDojoConfig } from "@dojoengine/core"; diff --git a/examples/example-vanillajs-phaser-recs/dojoConfig.ts b/examples/example-vanillajs-phaser-recs/dojoConfig.ts index 8519cd9d..447c8d81 100644 --- a/examples/example-vanillajs-phaser-recs/dojoConfig.ts +++ b/examples/example-vanillajs-phaser-recs/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/examples/example-vite-kitchen-sink/dojoConfig.ts b/examples/example-vite-kitchen-sink/dojoConfig.ts index e45ee85a..84dc74eb 100644 --- a/examples/example-vite-kitchen-sink/dojoConfig.ts +++ b/examples/example-vite-kitchen-sink/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/examples/example-vite-react-app-recs/dojoConfig.ts b/examples/example-vite-react-app-recs/dojoConfig.ts index e45ee85a..84dc74eb 100644 --- a/examples/example-vite-react-app-recs/dojoConfig.ts +++ b/examples/example-vite-react-app-recs/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/examples/example-vite-react-phaser-recs/dojoConfig.ts b/examples/example-vite-react-phaser-recs/dojoConfig.ts index 2c9d5c0b..4bde41ce 100644 --- a/examples/example-vite-react-phaser-recs/dojoConfig.ts +++ b/examples/example-vite-react-phaser-recs/dojoConfig.ts @@ -1,4 +1,4 @@ -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; import { createDojoConfig } from "@dojoengine/core"; export const dojoConfig = createDojoConfig({ diff --git a/examples/example-vite-react-pwa-recs/dojoConfig.ts b/examples/example-vite-react-pwa-recs/dojoConfig.ts index e45ee85a..84dc74eb 100644 --- a/examples/example-vite-react-pwa-recs/dojoConfig.ts +++ b/examples/example-vite-react-pwa-recs/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/examples/example-vite-react-sdk/dojoConfig.ts b/examples/example-vite-react-sdk/dojoConfig.ts index e45ee85a..84dc74eb 100644 --- a/examples/example-vite-react-sdk/dojoConfig.ts +++ b/examples/example-vite-react-sdk/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/examples/example-vite-react-threejs-recs/dojoConfig.ts b/examples/example-vite-react-threejs-recs/dojoConfig.ts index e45ee85a..84dc74eb 100644 --- a/examples/example-vite-react-threejs-recs/dojoConfig.ts +++ b/examples/example-vite-react-threejs-recs/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/examples/example-vite-svelte-recs/dojoConfig.ts b/examples/example-vite-svelte-recs/dojoConfig.ts index 6a3e5613..9b8b0455 100644 --- a/examples/example-vite-svelte-recs/dojoConfig.ts +++ b/examples/example-vite-svelte-recs/dojoConfig.ts @@ -1,4 +1,4 @@ -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; import { createDojoConfig } from "@dojoengine/core"; diff --git a/examples/example-vue-app-recs/dojoConfig.ts b/examples/example-vue-app-recs/dojoConfig.ts index e45ee85a..84dc74eb 100644 --- a/examples/example-vue-app-recs/dojoConfig.ts +++ b/examples/example-vue-app-recs/dojoConfig.ts @@ -1,6 +1,6 @@ import { createDojoConfig } from "@dojoengine/core"; -import manifest from "../../worlds/dojo-starter/manifest_dev.json"; +import manifest from "../dojo-starter/manifest_dev.json"; export const dojoConfig = createDojoConfig({ manifest, diff --git a/packages/create-dojo/src/commands/start.ts b/packages/create-dojo/src/commands/start.ts index 20febc0e..45f66fa3 100644 --- a/packages/create-dojo/src/commands/start.ts +++ b/packages/create-dojo/src/commands/start.ts @@ -66,27 +66,18 @@ async function init(projectName: string, cwd: string, template: string) { // Rewrite package.json in client directory await rewritePackageJson(projectName, clientPath); - console.log(`Cloning dojo-starter repository...`); - const gitCloneResult = spawn.sync( - "git", - [ - "clone", - "https://github.com/dojoengine/dojo-starter.git", - dojoStarterPath, - ], + // Clone dojo-starter + console.log(`Downloading dojo-starter...`); + const starterCloneResult = spawn.sync( + "npx", + ["degit", `dojoengine/dojo-starter`, dojoStarterPath], { stdio: "inherit" } ); - if (gitCloneResult.status !== 0) { + if (starterCloneResult.status !== 0) { throw new Error(`Failed to clone dojo-starter repository.`); } - // Clone dojo-starter - console.log(`Downloading dojo-starter...`); - spawn.sync("npx", ["degit", `dojoengine/dojo-starter`, dojoStarterPath], { - stdio: "inherit", - }); - console.log(`Project initialized at ${projectPath}`); console.log("Congrats! Your new project has been set up successfully.\n"); console.log(