@quilted/create 0.1.8 → 0.1.9
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/CHANGELOG.md +10 -0
- package/package.json +1 -1
- package/templates/app/App.tsx +15 -3
- package/templates/app/server.ts +7 -5
- package/templates/app/foundation/Routes.tsx +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @quilted/create
|
|
2
2
|
|
|
3
|
+
## 0.1.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#283](https://github.com/lemonmade/quilt/pull/283) [`daf06328`](https://github.com/lemonmade/quilt/commit/daf06328f242ac621b70942aa063a6138a12f62f) Thanks [@lemonmade](https://github.com/lemonmade)! - Rework asset manifest
|
|
8
|
+
|
|
9
|
+
* [`590e790b`](https://github.com/lemonmade/quilt/commit/590e790bebffcf367e00fe7248f83208e92a6eb5) Thanks [@lemonmade](https://github.com/lemonmade)! - Add missing global import
|
|
10
|
+
|
|
11
|
+
- [`cdecff17`](https://github.com/lemonmade/quilt/commit/cdecff1728876a8b9849f74ef1219220a3f60835) Thanks [@lemonmade](https://github.com/lemonmade)! - Simply Routes component in template apps
|
|
12
|
+
|
|
3
13
|
## 0.1.8
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/package.json
CHANGED
package/templates/app/App.tsx
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Router, useRoutes, AppContext} from '@quilted/quilt';
|
|
2
2
|
|
|
3
|
-
import {Head} from './foundation/Head';
|
|
4
3
|
import {Http} from './foundation/Http';
|
|
5
|
-
import {
|
|
4
|
+
import {Head} from './foundation/Head';
|
|
5
|
+
|
|
6
|
+
import {Start} from './features/Start';
|
|
6
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The root component for your application.
|
|
10
|
+
*/
|
|
7
11
|
export default function App() {
|
|
8
12
|
return (
|
|
9
13
|
<AppContext>
|
|
@@ -15,3 +19,11 @@ export default function App() {
|
|
|
15
19
|
</AppContext>
|
|
16
20
|
);
|
|
17
21
|
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This component renders the routes for your application. If you have a lot
|
|
25
|
+
* of routes, you may want to split this component into its own file.
|
|
26
|
+
*/
|
|
27
|
+
function Routes() {
|
|
28
|
+
return useRoutes([{match: '/', render: () => <Start />}]);
|
|
29
|
+
}
|
package/templates/app/server.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
import '@quilted/quilt/global';
|
|
1
2
|
import {
|
|
2
3
|
createHttpHandler,
|
|
3
4
|
createServerRenderingRequestHandler,
|
|
4
5
|
} from '@quilted/quilt/server';
|
|
5
|
-
import
|
|
6
|
+
import createAssetManifest from '@quilted/quilt/magic/app/asset-manifest';
|
|
6
7
|
|
|
7
8
|
import App from './App';
|
|
8
9
|
|
|
9
10
|
const httpHandler = createHttpHandler();
|
|
10
|
-
const requestHandler = createServerRenderingRequestHandler(App, {
|
|
11
|
-
assets,
|
|
12
|
-
});
|
|
13
11
|
|
|
14
12
|
// For all GET requests, render our React application.
|
|
15
|
-
httpHandler.get(
|
|
13
|
+
httpHandler.get(
|
|
14
|
+
createServerRenderingRequestHandler(App, {
|
|
15
|
+
assets: createAssetManifest(),
|
|
16
|
+
}),
|
|
17
|
+
);
|
|
16
18
|
|
|
17
19
|
export default httpHandler;
|