diff --git a/README.md b/README.md index 4a5df06..7beb78d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Remix Routers is a collection of libraries that port `react-router-dom` to diffe 👷‍♂️ _Not published yet, soon!_ +_Note: If you are using TypeScript you will need to use `patch-package` and copy the `@remix-run+router+0.1.0.patch` patch from this repo to internally change the `RouteObject.element` type from `ReactNode` to `any` for use with Vue components._ + ## Design Goals For simplicity and to keep things consistent between `react-router-dom` and these implementations, these implementations follow a few guidelines: diff --git a/packages/react/README.md b/packages/react-stub/README.md similarity index 100% rename from packages/react/README.md rename to packages/react-stub/README.md diff --git a/packages/react/index.html b/packages/react-stub/index.html similarity index 100% rename from packages/react/index.html rename to packages/react-stub/index.html diff --git a/packages/react/package.json b/packages/react-stub/package.json similarity index 79% rename from packages/react/package.json rename to packages/react-stub/package.json index 76107f4..ab936eb 100644 --- a/packages/react/package.json +++ b/packages/react-stub/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "remix-router-react-stub", + "name": "react-router-dom-stub", "version": "0.0.0", "description": "Stub package to implement a react-router-dom reference app", "author": "matt@brophy.org", @@ -8,9 +8,11 @@ "scripts": { "build": "vite build && tsc -b", "clean": "git clean -fX .", + "dev": "vite dev", "integration:start": "vite build && vite preview --port 3000", "integration:test": "cypress run --config-file ./../../cypress.json", - "integration": "start-server-and-test integration:start http-get://localhost:3000/ integration:test" + "integration": "start-server-and-test integration:start http-get://localhost:3000/ integration:test", + "prepublishOnly": "echo \"Refusing to publish react-router-dom-stub\" && exit 1" }, "dependencies": { "react": "18.1.0", diff --git a/packages/react/reference-app/App.tsx b/packages/react-stub/reference-app/App.tsx similarity index 100% rename from packages/react/reference-app/App.tsx rename to packages/react-stub/reference-app/App.tsx diff --git a/packages/react/reference-app/components/TaskItem.tsx b/packages/react-stub/reference-app/components/TaskItem.tsx similarity index 100% rename from packages/react/reference-app/components/TaskItem.tsx rename to packages/react-stub/reference-app/components/TaskItem.tsx diff --git a/packages/react/reference-app/main.css b/packages/react-stub/reference-app/main.css similarity index 100% rename from packages/react/reference-app/main.css rename to packages/react-stub/reference-app/main.css diff --git a/packages/react/reference-app/main.tsx b/packages/react-stub/reference-app/main.tsx similarity index 100% rename from packages/react/reference-app/main.tsx rename to packages/react-stub/reference-app/main.tsx diff --git a/packages/react/reference-app/routes/Index.tsx b/packages/react-stub/reference-app/routes/Index.tsx similarity index 100% rename from packages/react/reference-app/routes/Index.tsx rename to packages/react-stub/reference-app/routes/Index.tsx diff --git a/packages/react/reference-app/routes/NewTask.tsx b/packages/react-stub/reference-app/routes/NewTask.tsx similarity index 100% rename from packages/react/reference-app/routes/NewTask.tsx rename to packages/react-stub/reference-app/routes/NewTask.tsx diff --git a/packages/react/reference-app/routes/Page1.tsx b/packages/react-stub/reference-app/routes/Page1.tsx similarity index 100% rename from packages/react/reference-app/routes/Page1.tsx rename to packages/react-stub/reference-app/routes/Page1.tsx diff --git a/packages/react/reference-app/routes/Root.tsx b/packages/react-stub/reference-app/routes/Root.tsx similarity index 100% rename from packages/react/reference-app/routes/Root.tsx rename to packages/react-stub/reference-app/routes/Root.tsx diff --git a/packages/react/reference-app/routes/Task.tsx b/packages/react-stub/reference-app/routes/Task.tsx similarity index 100% rename from packages/react/reference-app/routes/Task.tsx rename to packages/react-stub/reference-app/routes/Task.tsx diff --git a/packages/react/reference-app/routes/Tasks.tsx b/packages/react-stub/reference-app/routes/Tasks.tsx similarity index 100% rename from packages/react/reference-app/routes/Tasks.tsx rename to packages/react-stub/reference-app/routes/Tasks.tsx diff --git a/packages/react/reference-app/tasks.ts b/packages/react-stub/reference-app/tasks.ts similarity index 100% rename from packages/react/reference-app/tasks.ts rename to packages/react-stub/reference-app/tasks.ts diff --git a/packages/react/reference-app/utils.ts b/packages/react-stub/reference-app/utils.ts similarity index 100% rename from packages/react/reference-app/utils.ts rename to packages/react-stub/reference-app/utils.ts diff --git a/packages/react/tsconfig.json b/packages/react-stub/tsconfig.json similarity index 100% rename from packages/react/tsconfig.json rename to packages/react-stub/tsconfig.json diff --git a/packages/react/vite.config.ts b/packages/react-stub/vite.config.ts similarity index 100% rename from packages/react/vite.config.ts rename to packages/react-stub/vite.config.ts diff --git a/packages/vue/LICENSE.md b/packages/vue/LICENSE.md new file mode 100644 index 0000000..33a94c4 --- /dev/null +++ b/packages/vue/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2022 Matt Brophy + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/vue/package.json b/packages/vue/package.json index cfd5299..5590081 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -38,7 +38,8 @@ "dev": "vite dev", "integration:start": "vite dev --mode=production --port 3000", "integration:test": "cypress run --config-file ./../../cypress.json", - "integration": "start-server-and-test integration:start http-get://localhost:3000/ integration:test" + "integration": "start-server-and-test integration:start http-get://localhost:3000/ integration:test", + "prepublishOnly": "vite build" }, "dependencies": { "@remix-run/router": "0.1.0",