From aa62991a37b7501c23f8c7faab9dcc87e2d33322 Mon Sep 17 00:00:00 2001 From: daishi Date: Sun, 11 Feb 2024 10:14:44 +0900 Subject: [PATCH 1/3] fix livecodes template --- .livecodes/react.json | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.livecodes/react.json b/.livecodes/react.json index a3998636b7..eee89dd110 100644 --- a/.livecodes/react.json +++ b/.livecodes/react.json @@ -13,12 +13,15 @@ "language": "jsx", "content": "import { StrictMode, Suspense } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { atom, useAtom } from 'jotai';\n\nconst countAtom = atom(0);\n\nconst Counter = () => {\n const [count, setCount] = useAtom(countAtom);\n const inc = () => setCount((c) => c + 1);\n return (\n <>\n {count} \n \n );\n};\n\nconst App = () => (\n \n
\n

Hello Jotai

\n

Enjoy coding!

\n \n
\n
\n);\n\nconst rootElement = document.getElementById('root');\nconst root = createRoot(rootElement);\n\nroot.render(\n \n \n \n);\n" }, - "imports": { - "jotai": "{{LC::TO_DATA_URL(./dist/esm/index.mjs)}}", - "jotai/vanilla": "{{LC::TO_DATA_URL(./dist/esm/vanilla.mjs)}}", - "jotai/utils": "{{LC::TO_DATA_URL(./dist/esm/utils.mjs)}}", - "jotai/react": "{{LC::TO_DATA_URL(./dist/esm/react.mjs)}}", - "jotai/vanilla/utils": "{{LC::TO_DATA_URL(./dist/esm/vanilla/utils.mjs)}}", - "jotai/react/utils": "{{LC::TO_DATA_URL(./dist/esm/react/utils.mjs)}}" + "customSettings": { + "jotai commit number used": "can we show something here?", + "imports": { + "jotai": "{{LC::TO_DATA_URL(./dist/esm/index.mjs)}}", + "jotai/vanilla": "{{LC::TO_DATA_URL(./dist/esm/vanilla.mjs)}}", + "jotai/utils": "{{LC::TO_DATA_URL(./dist/esm/utils.mjs)}}", + "jotai/react": "{{LC::TO_DATA_URL(./dist/esm/react.mjs)}}", + "jotai/vanilla/utils": "{{LC::TO_DATA_URL(./dist/esm/vanilla/utils.mjs)}}", + "jotai/react/utils": "{{LC::TO_DATA_URL(./dist/esm/react/utils.mjs)}}" + } } } From fc4e18ce71d4b0d808f36f6baa7aee9fe6895270 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Sun, 11 Feb 2024 10:39:45 +0900 Subject: [PATCH 2/3] Update .livecodes/react.json --- .livecodes/react.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.livecodes/react.json b/.livecodes/react.json index eee89dd110..6adab7757b 100644 --- a/.livecodes/react.json +++ b/.livecodes/react.json @@ -14,7 +14,7 @@ "content": "import { StrictMode, Suspense } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { atom, useAtom } from 'jotai';\n\nconst countAtom = atom(0);\n\nconst Counter = () => {\n const [count, setCount] = useAtom(countAtom);\n const inc = () => setCount((c) => c + 1);\n return (\n <>\n {count} \n \n );\n};\n\nconst App = () => (\n \n
\n

Hello Jotai

\n

Enjoy coding!

\n \n
\n
\n);\n\nconst rootElement = document.getElementById('root');\nconst root = createRoot(rootElement);\n\nroot.render(\n \n \n \n);\n" }, "customSettings": { - "jotai commit number used": "can we show something here?", + "jotai commit sha": "{{LC::SHA}}", "imports": { "jotai": "{{LC::TO_DATA_URL(./dist/esm/index.mjs)}}", "jotai/vanilla": "{{LC::TO_DATA_URL(./dist/esm/vanilla.mjs)}}", From c69f598f4e20137d33dd49bda7607b58bd220853 Mon Sep 17 00:00:00 2001 From: daishi Date: Sun, 11 Feb 2024 20:28:13 +0900 Subject: [PATCH 3/3] short sha --- .livecodes/react.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.livecodes/react.json b/.livecodes/react.json index 6adab7757b..ecc9772295 100644 --- a/.livecodes/react.json +++ b/.livecodes/react.json @@ -14,7 +14,7 @@ "content": "import { StrictMode, Suspense } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { atom, useAtom } from 'jotai';\n\nconst countAtom = atom(0);\n\nconst Counter = () => {\n const [count, setCount] = useAtom(countAtom);\n const inc = () => setCount((c) => c + 1);\n return (\n <>\n {count} \n \n );\n};\n\nconst App = () => (\n \n
\n

Hello Jotai

\n

Enjoy coding!

\n \n
\n
\n);\n\nconst rootElement = document.getElementById('root');\nconst root = createRoot(rootElement);\n\nroot.render(\n \n \n \n);\n" }, "customSettings": { - "jotai commit sha": "{{LC::SHA}}", + "jotai commit sha": "{{LC::SHORT_SHA}}", "imports": { "jotai": "{{LC::TO_DATA_URL(./dist/esm/index.mjs)}}", "jotai/vanilla": "{{LC::TO_DATA_URL(./dist/esm/vanilla.mjs)}}",