diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d73a43a0..a878337b 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -14,7 +14,7 @@ module.exports = { }, 'import/resolver': { node: { - paths: ['src'], + paths: ['src-web'], extensions: ['.js', '.jsx', '.ts', '.tsx'], }, }, diff --git a/index.html b/index.html index a4b59983..f041da8c 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,6 @@
- + diff --git a/rsw.toml b/rsw.toml index a27c0bb0..e6d5e046 100644 --- a/rsw.toml +++ b/rsw.toml @@ -34,6 +34,6 @@ dir = "my-template" #! 📦 -------- package: @rsw -------- [[crates]] #! npm package name (path: $ROOT/@rsw) - name = "@rsw/hello" + name = "src-wasm/hello" #! run `npm link`: `true` | `false`, default is `false` link = true diff --git a/@rsw/hello/.gitignore b/src-wasm/hello/.gitignore similarity index 100% rename from @rsw/hello/.gitignore rename to src-wasm/hello/.gitignore diff --git a/@rsw/hello/Cargo.toml b/src-wasm/hello/Cargo.toml similarity index 100% rename from @rsw/hello/Cargo.toml rename to src-wasm/hello/Cargo.toml diff --git a/@rsw/hello/src/lib.rs b/src-wasm/hello/src/lib.rs similarity index 100% rename from @rsw/hello/src/lib.rs rename to src-wasm/hello/src/lib.rs diff --git a/@rsw/hello/src/utils.rs b/src-wasm/hello/src/utils.rs similarity index 100% rename from @rsw/hello/src/utils.rs rename to src-wasm/hello/src/utils.rs diff --git a/src/App.tsx b/src-web/App.tsx similarity index 100% rename from src/App.tsx rename to src-web/App.tsx diff --git a/src/components/Button.tsx b/src-web/components/Button.tsx similarity index 100% rename from src/components/Button.tsx rename to src-web/components/Button.tsx diff --git a/src/components/Dropdown.tsx b/src-web/components/Dropdown.tsx similarity index 100% rename from src/components/Dropdown.tsx rename to src-web/components/Dropdown.tsx diff --git a/src/components/Editor/Editor.css b/src-web/components/Editor/Editor.css similarity index 100% rename from src/components/Editor/Editor.css rename to src-web/components/Editor/Editor.css diff --git a/src/components/Editor/Editor.tsx b/src-web/components/Editor/Editor.tsx similarity index 100% rename from src/components/Editor/Editor.tsx rename to src-web/components/Editor/Editor.tsx diff --git a/src/components/Grid.tsx b/src-web/components/Grid.tsx similarity index 100% rename from src/components/Grid.tsx rename to src-web/components/Grid.tsx diff --git a/src/components/HotKey.tsx b/src-web/components/HotKey.tsx similarity index 100% rename from src/components/HotKey.tsx rename to src-web/components/HotKey.tsx diff --git a/src/components/Input.tsx b/src-web/components/Input.tsx similarity index 100% rename from src/components/Input.tsx rename to src-web/components/Input.tsx diff --git a/src/components/Stacks.tsx b/src-web/components/Stacks.tsx similarity index 100% rename from src/components/Stacks.tsx rename to src-web/components/Stacks.tsx diff --git a/src/hooks/useCodemirror.ts b/src-web/hooks/useCodemirror.ts similarity index 100% rename from src/hooks/useCodemirror.ts rename to src-web/hooks/useCodemirror.ts diff --git a/src/main.css b/src-web/main.css similarity index 100% rename from src/main.css rename to src-web/main.css diff --git a/src/main.tsx b/src-web/main.tsx similarity index 92% rename from src/main.tsx rename to src-web/main.tsx index baac0246..b6d89744 100644 --- a/src/main.tsx +++ b/src-web/main.tsx @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'; import App from './App'; import { HelmetProvider } from 'react-helmet-async'; import { MotionConfig } from 'framer-motion'; -import init, { greet } from '@rsw/hello'; +import init, { greet } from 'hello'; import './main.css'; diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 35cd8b4f..c506cf44 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -2,7 +2,7 @@ module.exports = { content: [ "./index.html", - "./src/**/*.{js,ts,jsx,tsx}", + "./src-web/**/*.{js,ts,jsx,tsx}", ], theme: { extend: {}, diff --git a/tsconfig.json b/tsconfig.json index 3d0a51a8..6162bcb4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,6 +16,8 @@ "noEmit": true, "jsx": "react-jsx" }, - "include": ["src"], + "include": [ + "src-web" + ], "references": [{ "path": "./tsconfig.node.json" }] }