Rename projects

This commit is contained in:
Danny McGee
2023-09-29 18:33:00 -04:00
parent 32057039b0
commit bed97cff47
30 changed files with 40 additions and 40 deletions
Generated
+9 -9
View File
@@ -1798,15 +1798,6 @@ dependencies = [
"winapi", "winapi",
] ]
[[package]]
name = "hello-world"
version = "0.1.0"
dependencies = [
"bevy",
"console_error_panic_hook",
"wasm-bindgen",
]
[[package]] [[package]]
name = "hexasphere" name = "hexasphere"
version = "9.1.0" version = "9.1.0"
@@ -2870,6 +2861,15 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "studio"
version = "0.1.0"
dependencies = [
"bevy",
"console_error_panic_hook",
"wasm-bindgen",
]
[[package]] [[package]]
name = "svg_fmt" name = "svg_fmt"
version = "0.4.1" version = "0.4.1"
+1 -1
View File
@@ -1,7 +1,7 @@
[workspace] [workspace]
resolver = "2" resolver = "2"
members = [ members = [
"./hello-world" "./studio"
] ]
[workspace.dependencies.bevy] [workspace.dependencies.bevy]
-3
View File
@@ -1,3 +0,0 @@
fn main() {
hello_world::init();
}
@@ -1,15 +1,15 @@
{ {
"name": "hello-web", "name": "studio-frontend",
"$schema": "../node_modules/nx/schemas/project-schema.json", "$schema": "../node_modules/nx/schemas/project-schema.json",
"projectType": "application", "projectType": "application",
"sourceRoot": "hello-web/src", "sourceRoot": "studio-frontend/src",
"tags": [], "tags": [],
"targets": { "targets": {
"build": { "build": {
"executor": "@nx/vite:build", "executor": "@nx/vite:build",
"dependsOn": [ "dependsOn": [
{ {
"projects": ["hello-world"], "projects": ["studio"],
"target": "build:web" "target": "build:web"
} }
], ],
@@ -18,7 +18,7 @@
], ],
"defaultConfiguration": "production", "defaultConfiguration": "production",
"options": { "options": {
"outputPath": "dist/hello-web" "outputPath": "dist/studio-frontend"
}, },
"configurations": { "configurations": {
"development": { "development": {
@@ -34,20 +34,20 @@
"defaultConfiguration": "development", "defaultConfiguration": "development",
"dependsOn": [ "dependsOn": [
{ {
"projects": ["hello-world"], "projects": ["studio"],
"target": "build:web" "target": "build:web"
} }
], ],
"options": { "options": {
"buildTarget": "hello-web:build" "buildTarget": "studio-frontend:build"
}, },
"configurations": { "configurations": {
"development": { "development": {
"buildTarget": "hello-web:build:development", "buildTarget": "studio-frontend:build:development",
"hmr": true "hmr": true
}, },
"production": { "production": {
"buildTarget": "hello-web:build:production", "buildTarget": "studio-frontend:build:production",
"hmr": false "hmr": false
} }
} }
@@ -56,14 +56,14 @@
"executor": "@nx/vite:preview-server", "executor": "@nx/vite:preview-server",
"defaultConfiguration": "development", "defaultConfiguration": "development",
"options": { "options": {
"buildTarget": "hello-web:build" "buildTarget": "studio-frontend:build"
}, },
"configurations": { "configurations": {
"development": { "development": {
"buildTarget": "hello-web:build:development" "buildTarget": "studio-frontend:build:development"
}, },
"production": { "production": {
"buildTarget": "hello-web:build:production" "buildTarget": "studio-frontend:build:production"
} }
} }
} }

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@@ -1,4 +1,4 @@
import * as helloWorld from "@storyteller/hello-world"; import * as studio from "@storyteller/studio";
import "./app.element.scss"; import "./app.element.scss";
@@ -13,7 +13,7 @@ export class AppElement extends HTMLElement {
// CLI, we can craft our own JS API to interact with Bevy! \o/ As a start, // CLI, we can craft our own JS API to interact with Bevy! \o/ As a start,
// we should exploit this to pass an explicit canvas size to Bevy and keep // we should exploit this to pass an explicit canvas size to Bevy and keep
// it up to date with the browser viewport size. // it up to date with the browser viewport size.
helloWorld.init(); studio.init();
} }
} }
customElements.define("app-root", AppElement); customElements.define("app-root", AppElement);
@@ -9,7 +9,7 @@ import topLevelAwait from "vite-plugin-top-level-await";
import mergeAssetsDirs from "./vite-plugins/multiple-assets"; import mergeAssetsDirs from "./vite-plugins/multiple-assets";
export default defineConfig({ export default defineConfig({
cacheDir: "../node_modules/.vite/hello-web", cacheDir: "../node_modules/.vite/studio-frontend",
server:{ server:{
port: 4200, port: 4200,
host: "localhost", host: "localhost",
@@ -23,8 +23,8 @@ export default defineConfig({
wasm(), wasm(),
topLevelAwait(), topLevelAwait(),
mergeAssetsDirs([ mergeAssetsDirs([
"hello-web/public", "studio-frontend/public",
"dist/hello-world/public", "dist/studio/public",
]), ]),
], ],
}); });
View File
+3 -3
View File
@@ -1,15 +1,15 @@
[package] [package]
name = "hello-world" name = "studio"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
[lib] [lib]
name = "hello_world" name = "studio"
crate-type = ["cdylib", "rlib"] crate-type = ["cdylib", "rlib"]
path = "src/lib.rs" path = "src/lib.rs"
[[bin]] [[bin]]
name = "hello-world-standalone" name = "studio-standalone"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
@@ -1,8 +1,8 @@
{ {
"name": "hello-world", "name": "studio",
"$schema": "../node_modules/nx/schemas/project-schema.json", "$schema": "../node_modules/nx/schemas/project-schema.json",
"projectType": "application", "projectType": "application",
"sourceRoot": "./hello-world/src", "sourceRoot": "./studio/src",
"targets": { "targets": {
"build": { "build": {
"executor": "@nxrs/cargo:build", "executor": "@nxrs/cargo:build",
@@ -19,11 +19,11 @@
"executor": "nx:run-commands", "executor": "nx:run-commands",
"options": { "options": {
"commands": [ "commands": [
"wasm-pack build --out-dir ../dist/hello-world/ -- --features wasm", "wasm-pack build --out-dir ../dist/studio/ -- --features wasm",
"node scripts/copy-assets.mjs" "node scripts/copy-assets.mjs"
], ],
"cwd": "hello-world", "cwd": "studio",
"envFile": "hello-world/.env", "envFile": "studio/.env",
"parallel": false "parallel": false
} }
}, },
@@ -32,7 +32,7 @@
"options": { "options": {
"release": false, "release": false,
"run": true, "run": true,
"bin": "hello-world-standalone" "bin": "studio-standalone"
} }
}, },
"test": { "test": {
@@ -5,7 +5,7 @@ import url from "node:url";
async function main() { async function main() {
const __dirname = url.fileURLToPath(new URL(".", import.meta.url)); const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
const assetsSrc = path.resolve(__dirname, "../assets"); const assetsSrc = path.resolve(__dirname, "../assets");
const assetsDest = path.resolve(__dirname, "../../dist/hello-world/public/assets"); const assetsDest = path.resolve(__dirname, "../../dist/studio/public/assets");
await fs.cp(assetsSrc, assetsDest, { recursive: true }); await fs.cp(assetsSrc, assetsDest, { recursive: true });
} }
+3
View File
@@ -0,0 +1,3 @@
fn main() {
studio::init();
}
+1 -1
View File
@@ -15,7 +15,7 @@
"skipDefaultLibCheck": true, "skipDefaultLibCheck": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@storyteller/hello-world": ["dist/hello-world"] "@storyteller/studio": ["dist/studio"]
} }
}, },
"exclude": ["node_modules", "tmp"] "exclude": ["node_modules", "tmp"]