Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: create-dojo project broken unless name is worlds #333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/dojo-starter
2 changes: 1 addition & 1 deletion examples/example-nodejs-bot/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion examples/example-vanillajs-phaser-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-kitchen-sink/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-app-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-phaser-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-pwa-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-sdk/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-react-threejs-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion examples/example-vite-svelte-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
2 changes: 1 addition & 1 deletion examples/example-vue-app-recs/dojoConfig.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
21 changes: 6 additions & 15 deletions packages/create-dojo/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading