@remix-run/routes-option-adapter 0.0.0-experimental-eab1c4d1e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +22 -0
- package/README.md +13 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +27 -0
- package/package.json +43 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Remix Software Inc. 2020-2021
|
|
4
|
+
Copyright (c) Shopify Inc. 2022-2024
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Welcome to Remix!
|
|
2
|
+
|
|
3
|
+
[Remix](https://remix.run) is a web framework that helps you build better websites with React.
|
|
4
|
+
|
|
5
|
+
To get started, open a new shell and run:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx create-remix@latest
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Then follow the prompts you see in your terminal.
|
|
12
|
+
|
|
13
|
+
For more information about Remix, [visit remix.run](https://remix.run)!
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type UNSAFE_DefineRoutesFunction as DefineRoutesFunction } from "@remix-run/dev";
|
|
2
|
+
import { type RouteConfigEntry } from "@remix-run/route-config";
|
|
3
|
+
export type { DefineRoutesFunction };
|
|
4
|
+
/**
|
|
5
|
+
* Adapter for [Remix's `routes` config
|
|
6
|
+
* option](https://remix.run/docs/en/v2/file-conventions/vite-config#routes),
|
|
7
|
+
* for use within `routes.ts`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function remixRoutesOptionAdapter(routes: (defineRoutes: DefineRoutesFunction) => ReturnType<DefineRoutesFunction> | Promise<ReturnType<DefineRoutesFunction>>): Promise<RouteConfigEntry[]>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @remix-run/routes-option-adapter v0.0.0-experimental-eab1c4d1e
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Remix Software Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
14
|
+
|
|
15
|
+
var dev = require('@remix-run/dev');
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Adapter for [Remix's `routes` config
|
|
19
|
+
* option](https://remix.run/docs/en/v2/file-conventions/vite-config#routes),
|
|
20
|
+
* for use within `routes.ts`.
|
|
21
|
+
*/
|
|
22
|
+
async function remixRoutesOptionAdapter(routes) {
|
|
23
|
+
let routeManifest = await routes(dev.UNSAFE_defineRoutes);
|
|
24
|
+
return dev.UNSAFE_routeManifestToRouteConfig(routeManifest);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
exports.remixRoutesOptionAdapter = remixRoutesOptionAdapter;
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@remix-run/routes-option-adapter",
|
|
3
|
+
"version": "0.0.0-experimental-eab1c4d1e",
|
|
4
|
+
"description": "Adapter for Remix's \"routes\" config option, for use within routes.ts",
|
|
5
|
+
"bugs": {
|
|
6
|
+
"url": "https://github.com/remix-run/remix/issues"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/remix-run/remix",
|
|
11
|
+
"directory": "packages/remix-routes-option-adapter"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "dist/index.js",
|
|
15
|
+
"typings": "dist/index.d.ts",
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@remix-run/dev": "0.0.0-experimental-eab1c4d1e",
|
|
18
|
+
"@remix-run/route-config": "0.0.0-experimental-eab1c4d1e",
|
|
19
|
+
"typescript": "^5.1.6"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@remix-run/dev": "^0.0.0-experimental-eab1c4d1e",
|
|
23
|
+
"@remix-run/route-config": "^0.0.0-experimental-eab1c4d1e",
|
|
24
|
+
"typescript": "^5.1.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"typescript": {
|
|
28
|
+
"optional": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=18.0.0"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist/",
|
|
36
|
+
"CHANGELOG.md",
|
|
37
|
+
"LICENSE.md",
|
|
38
|
+
"README.md"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"tsc": "tsc"
|
|
42
|
+
}
|
|
43
|
+
}
|