Skip to content

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
LidamaoHub committed Mar 6, 2024
1 parent 212967a commit 67da493
Show file tree
Hide file tree
Showing 10 changed files with 396 additions and 73 deletions.
Binary file removed .DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
node_modules
docs
docs

.DS_Store
7 changes: 4 additions & 3 deletions examples/vue/vue-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"build": "vite build",
"preview": "vite preview",
"create-components": "npx @dojoengine/core ../../dojo-starter/target/dev/manifest.json src/dojo/generated/contractComponents.ts http://localhost:5050 0x28f5999ae62fec17c09c52a800e244961dba05251f5aaf923afabd9c9804d1a"
},
"dependencies": {
"@dojoengine/core": "0.5.9",
"@dojoengine/recs": "^0.1.35",
"@dojoengine/recs": "0.1.35",
"@dojoengine/state": "0.5.9",
"@dojoengine/torii-client": "0.5.9",
"@dojoengine/utils": "0.5.9",
"@latticexyz/utils": "^1.43.0",
"starknet": "^5.24.3",
"vite-plugin-top-level-await": "^1.4.1",
"vite-plugin-wasm": "^3.3.0",
"vue": "^3.4.19"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"typescript": "^5.2.2",
"vite": "^5.1.4",
"vue-tsc": "^1.8.27"
"vue-tsc": "^2.0.4"
}
}
Binary file modified examples/vue/vue-app/src/.DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion examples/vue/vue-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const dojoContext = reactive<any>({
});
const position = ref<any>(null);
const moves = ref<any>(null);
const entity = ref<any>(null);
const isDeploying = ref(false);
const create = async () => {
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/vue-app/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function useComponentValue<S extends Schema>(
entity: Entity | undefined,
defaultValue?: ComponentValue<S>
) {
const value = ref(
const value = ref<any>(
entity != null ? getComponentValue(component, entity) : undefined
)

Expand Down
28 changes: 16 additions & 12 deletions examples/vue/vue-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,28 @@
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"moduleResolution": "node",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
// "noUnusedLocals": true,
// "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}
"include": ["src", "dojoConfig.ts"],
"exclude": [
"node_modules",
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
9 changes: 5 additions & 4 deletions examples/vue/vue-app/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
"include": [
"vite.config.ts"
]
}
3 changes: 2 additions & 1 deletion examples/vue/vue-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import wasm from "vite-plugin-wasm";
import topLevelAwait from "vite-plugin-top-level-await";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue(), wasm()],
plugins: [vue(), wasm(), topLevelAwait()],
})
Loading

0 comments on commit 67da493

Please sign in to comment.