create-puck-app 0.12.0-canary.f882878 → 0.12.1-canary.15284aa

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-puck-app",
3
- "version": "0.12.0-canary.f882878",
3
+ "version": "0.12.1-canary.15284aa",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,6 +37,10 @@ To adopt this recipe you will need to:
37
37
 
38
38
  By default, this recipe will have JavaScript enable on all routes - like a usual react app. If you know that your Puck content doesn't need react, then you can disable JS uncommenting the relevant code in `/app/root.tsx` and the example route `/app/routes/_index.tsx`. Check the network tab for no JS downloads, and verify that the page still works.
39
39
 
40
+ ## Disabling JavaScript
41
+
42
+ This recipe can be adapted to disable JavaScript. See the [Remix docs](https://remix.run/docs/en/main/guides/disabling-javascript) for steps on how to do this.
43
+
40
44
  ## License
41
45
 
42
46
  MIT © [Measured Co.](https://github.com/measuredco)
@@ -7,7 +7,6 @@ import {
7
7
  Outlet,
8
8
  Scripts,
9
9
  ScrollRestoration,
10
- // useMatches,
11
10
  } from "@remix-run/react";
12
11
 
13
12
  export const links: LinksFunction = () => [
@@ -15,13 +14,6 @@ export const links: LinksFunction = () => [
15
14
  ];
16
15
 
17
16
  export default function App() {
18
- /**
19
- * Disable client-side JS - Optional
20
- * @see https://remix.run/docs/en/main/guides/disabling-javascript
21
- */
22
- // const matches = useMatches();
23
- // const includeScripts = matches.some((match) => match.handle?.hydrate);
24
-
25
17
  return (
26
18
  <html lang="en">
27
19
  <head>
@@ -33,8 +25,6 @@ export default function App() {
33
25
  <body>
34
26
  <Outlet />
35
27
  <ScrollRestoration />
36
- {/* Conditionally render scripts - Optional */}
37
- {/* {includeScripts ? <Scripts /> : null} */}
38
28
  <Scripts />
39
29
  <LiveReload />
40
30
  </body>
@@ -6,15 +6,6 @@ import { useLoaderData } from "@remix-run/react";
6
6
  import puckConfig from "../../puck.config";
7
7
  import { getPage } from "~/models/page.server";
8
8
 
9
- /**
10
- * Disable client-side JS - Optional
11
- * If you know that your Puck content doesn't need react.
12
- * Then you can disable JS for this route.
13
- * @see https://remix.run/docs/en/main/guides/disabling-javascript
14
- */
15
-
16
- // export const handle = { hydrate: false };
17
-
18
9
  export const loader = async ({ params }: LoaderFunctionArgs) => {
19
10
  // Get path, and default to slash for root path.
20
11
  const puckPath = params.puckPath || "/";
@@ -39,11 +30,5 @@ export const meta: MetaFunction<typeof loader> = ({ data }) => {
39
30
  export default function Page() {
40
31
  const { puckData } = useLoaderData<typeof loader>();
41
32
 
42
- /**
43
- * TypeStript error
44
- * Type 'Config<Props>' is not assignable to type 'Config'. Use 'as Config' for now.
45
- * @see https://github.com/measuredco/puck/issues/185
46
- */
47
-
48
33
  return <Render config={puckConfig as Config} data={puckData} />;
49
34
  }
@@ -49,12 +49,6 @@ export default function Edit() {
49
49
  const { initialData } = useLoaderData<typeof loader>();
50
50
  const submit = useSubmit();
51
51
 
52
- /**
53
- * TypeStript error
54
- * Type 'Config<Props>' is not assignable to type 'Config'. Use 'as Config' for now.
55
- * @see https://github.com/measuredco/puck/issues/185
56
- */
57
-
58
52
  return (
59
53
  <Puck
60
54
  config={puckConfig as Config}
@@ -2,6 +2,8 @@
2
2
  "name": "{{appName}}",
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
+ "sideEffects": false,
6
+ "type": "module",
5
7
  "scripts": {
6
8
  "build": "remix build",
7
9
  "dev": "remix dev --manual",
@@ -25,5 +27,8 @@
25
27
  "@types/react-dom": "^18.2.7",
26
28
  "eslint": "^8.38.0",
27
29
  "typescript": "^5.1.6"
30
+ },
31
+ "engines": {
32
+ "node": ">=18.0.0"
28
33
  }
29
34
  }