diff --git a/README.md b/README.md index 026307fd..69e054d7 100644 --- a/README.md +++ b/README.md @@ -695,6 +695,44 @@ How do we solve this ? Developers love having framework overview by examples. It - [x] Fetch data + +
+ + + No.JS + + + +- [x] Reactivity + - [x] Declare state + - [x] Update state + - [x] Computed state +- [x] Templating + - [x] Minimal template + - [x] Styling + - [x] Loop + - [x] Event click + - [x] Dom ref + - [x] Conditional +- [x] Lifecycle + - [x] On mount + - [x] On unmount +- [x] Component composition + - [x] Props + - [x] Emit to parent + - [x] Slot + - [x] Slot fallback + - [x] Context +- [x] Form input + - [x] Input text + - [x] Checkbox + - [x] Radio + - [x] Select +- [x] Webapp features + - [x] Render app + - [x] Fetch data + +
diff --git a/build/lib/playgroundUrlByFramework.ts b/build/lib/playgroundUrlByFramework.ts index 1bc0cff3..7577ee1e 100644 --- a/build/lib/playgroundUrlByFramework.ts +++ b/build/lib/playgroundUrlByFramework.ts @@ -90,6 +90,32 @@ const playgroundUrlByFramework: Record = { return `${BASE_URL}${parameters}`; }, + nojs: (contentByFilename: Record) => { + const BASE_URL = "https://codesandbox.io/api/v1/sandboxes/define?embed=1¶meters="; + const BASE_PREFIX = `\n\n \n \n \n No.JS Playground\n \n \n \n\n`; + const BASE_SUFFIX = `\n \n`; + + const indexHtml = contentByFilename["index.html"] || ""; + // The render-app example already ships a full HTML document, so avoid double-wrapping it. + const isFullDocument = /]/i.test(indexHtml); + + const parameters = getParameters({ + files: { + ...contentByFilename, + "package.json": { + content: { dependencies: {} }, + }, + "index.html": { + content: isFullDocument ? indexHtml : BASE_PREFIX + indexHtml + BASE_SUFFIX, + }, + "sandbox.config.json": { + content: '{\n "template": "static"\n}', + }, + }, + }); + + return `${BASE_URL}${parameters}`; + }, solid: (contentByFilename: Record) => { const BASE_URL = "https://playground.solidjs.com/#"; const SOURCE_PREFIX = `import { render } from "solid-js/web";\n`; diff --git a/content/1-reactivity/1-declare-state/nojs/index.html b/content/1-reactivity/1-declare-state/nojs/index.html new file mode 100644 index 00000000..04b42cc9 --- /dev/null +++ b/content/1-reactivity/1-declare-state/nojs/index.html @@ -0,0 +1 @@ +

diff --git a/content/1-reactivity/2-update-state/nojs/index.html b/content/1-reactivity/2-update-state/nojs/index.html new file mode 100644 index 00000000..7b4ff39c --- /dev/null +++ b/content/1-reactivity/2-update-state/nojs/index.html @@ -0,0 +1 @@ +

diff --git a/content/1-reactivity/3-computed-state/nojs/index.html b/content/1-reactivity/3-computed-state/nojs/index.html new file mode 100644 index 00000000..332e8713 --- /dev/null +++ b/content/1-reactivity/3-computed-state/nojs/index.html @@ -0,0 +1,4 @@ +
+ +

+
diff --git a/content/2-templating/1-minimal-template/nojs/index.html b/content/2-templating/1-minimal-template/nojs/index.html new file mode 100644 index 00000000..159202e8 --- /dev/null +++ b/content/2-templating/1-minimal-template/nojs/index.html @@ -0,0 +1 @@ +

Hello world

diff --git a/content/2-templating/2-styling/nojs/index.html b/content/2-templating/2-styling/nojs/index.html new file mode 100644 index 00000000..d7d08498 --- /dev/null +++ b/content/2-templating/2-styling/nojs/index.html @@ -0,0 +1,8 @@ +

I am red

+ + + diff --git a/content/2-templating/3-loop/nojs/index.html b/content/2-templating/3-loop/nojs/index.html new file mode 100644 index 00000000..5d9a5ca0 --- /dev/null +++ b/content/2-templating/3-loop/nojs/index.html @@ -0,0 +1,3 @@ +
    +
  • +
diff --git a/content/2-templating/4-event-click/nojs/index.html b/content/2-templating/4-event-click/nojs/index.html new file mode 100644 index 00000000..5d4d8b57 --- /dev/null +++ b/content/2-templating/4-event-click/nojs/index.html @@ -0,0 +1,4 @@ +
+

Counter:

+ +
diff --git a/content/2-templating/5-dom-ref/nojs/index.html b/content/2-templating/5-dom-ref/nojs/index.html new file mode 100644 index 00000000..1831ca93 --- /dev/null +++ b/content/2-templating/5-dom-ref/nojs/index.html @@ -0,0 +1 @@ + diff --git a/content/2-templating/6-conditional/nojs/index.html b/content/2-templating/6-conditional/nojs/index.html new file mode 100644 index 00000000..cfa0af71 --- /dev/null +++ b/content/2-templating/6-conditional/nojs/index.html @@ -0,0 +1,14 @@ +
+ + + +

Light is:

+

+ You must + STOP + SLOW DOWN + GO +

+
diff --git a/content/3-lifecycle/1-on-mount/nojs/index.html b/content/3-lifecycle/1-on-mount/nojs/index.html new file mode 100644 index 00000000..5dff57a6 --- /dev/null +++ b/content/3-lifecycle/1-on-mount/nojs/index.html @@ -0,0 +1,3 @@ +

+ Page title: +

diff --git a/content/3-lifecycle/2-on-unmount/nojs/index.html b/content/3-lifecycle/2-on-unmount/nojs/index.html new file mode 100644 index 00000000..87c71952 --- /dev/null +++ b/content/3-lifecycle/2-on-unmount/nojs/index.html @@ -0,0 +1,7 @@ +

+ Current time: +

diff --git a/content/4-component-composition/1-props/nojs/index.html b/content/4-component-composition/1-props/nojs/index.html new file mode 100644 index 00000000..cb584dac --- /dev/null +++ b/content/4-component-composition/1-props/nojs/index.html @@ -0,0 +1,13 @@ + + +
diff --git a/content/4-component-composition/2-emit-to-parent/nojs/index.html b/content/4-component-composition/2-emit-to-parent/nojs/index.html new file mode 100644 index 00000000..38a6b549 --- /dev/null +++ b/content/4-component-composition/2-emit-to-parent/nojs/index.html @@ -0,0 +1,10 @@ + + +
+

Are you happy?

+
+

+
diff --git a/content/4-component-composition/3-slot/nojs/index.html b/content/4-component-composition/3-slot/nojs/index.html new file mode 100644 index 00000000..cd45c9c4 --- /dev/null +++ b/content/4-component-composition/3-slot/nojs/index.html @@ -0,0 +1,20 @@ + + +
Click me!
diff --git a/content/4-component-composition/4-slot-fallback/nojs/index.html b/content/4-component-composition/4-slot-fallback/nojs/index.html new file mode 100644 index 00000000..588e294e --- /dev/null +++ b/content/4-component-composition/4-slot-fallback/nojs/index.html @@ -0,0 +1,21 @@ + + +
+
I got content!
diff --git a/content/4-component-composition/5-context/nojs/index.html b/content/4-component-composition/5-context/nojs/index.html new file mode 100644 index 00000000..f8b7ede9 --- /dev/null +++ b/content/4-component-composition/5-context/nojs/index.html @@ -0,0 +1,15 @@ +
+ +

Welcome back,

+ +
+

My Profile

+

Username:

+

Email:

+ +
diff --git a/content/6-form-input/1-input-text/nojs/index.html b/content/6-form-input/1-input-text/nojs/index.html new file mode 100644 index 00000000..4f3d93d2 --- /dev/null +++ b/content/6-form-input/1-input-text/nojs/index.html @@ -0,0 +1,4 @@ +
+

+ +
diff --git a/content/6-form-input/2-checkbox/nojs/index.html b/content/6-form-input/2-checkbox/nojs/index.html new file mode 100644 index 00000000..5546a862 --- /dev/null +++ b/content/6-form-input/2-checkbox/nojs/index.html @@ -0,0 +1,4 @@ +
+ + +
diff --git a/content/6-form-input/3-radio/nojs/index.html b/content/6-form-input/3-radio/nojs/index.html new file mode 100644 index 00000000..b9869931 --- /dev/null +++ b/content/6-form-input/3-radio/nojs/index.html @@ -0,0 +1,9 @@ +
+
Picked:
+ + + + + + +
diff --git a/content/6-form-input/4-select/nojs/index.html b/content/6-form-input/4-select/nojs/index.html new file mode 100644 index 00000000..3fefa3bb --- /dev/null +++ b/content/6-form-input/4-select/nojs/index.html @@ -0,0 +1,21 @@ +
+ +
diff --git a/content/7-webapp-features/1-render-app/nojs/index.html b/content/7-webapp-features/1-render-app/nojs/index.html new file mode 100644 index 00000000..31511a37 --- /dev/null +++ b/content/7-webapp-features/1-render-app/nojs/index.html @@ -0,0 +1,10 @@ + + + + + + + +

Hello world

+ + diff --git a/content/7-webapp-features/2-fetch-data/nojs/index.html b/content/7-webapp-features/2-fetch-data/nojs/index.html new file mode 100644 index 00000000..32b2860e --- /dev/null +++ b/content/7-webapp-features/2-fetch-data/nojs/index.html @@ -0,0 +1,16 @@ +
+
    +
  • + user +

    +
  • +
+
+ + + diff --git a/frameworks.ts b/frameworks.ts index 5ee85f51..0a413448 100644 --- a/frameworks.ts +++ b/frameworks.ts @@ -282,6 +282,19 @@ export const frameworkVersions: FrameworkVersion[] = [ mainPackageName: "ripple", releaseDate: "2023-01-01", }, + { + id: "nojs", + title: "No.JS", + img: "framework/nojs.svg", + playgroundURL: "https://no-js.dev/", + documentationURL: "https://no-js.dev/", + filesSorter(files) { + return sortAllFilenames(files, ["index.html"]); + }, + repositoryLink: "https://github.com/no-js-dev/nojs", + mainPackageName: "@no-js-dev/nojs", + releaseDate: "2024-01-01", + }, ]; export const frameworks: Framework[] = [ @@ -298,6 +311,7 @@ export const frameworks: Framework[] = [ { id: "qwik", name: "Qwik", latestStable: "qwik" }, { id: "marko", name: "Marko", latestStable: "marko" }, { id: "ripple", name: "Ripple", latestStable: "ripple" }, + { id: "nojs", name: "No.JS", latestStable: "nojs" }, ]; /** diff --git a/static/framework/nojs.svg b/static/framework/nojs.svg new file mode 100644 index 00000000..f1d0dfe7 --- /dev/null +++ b/static/framework/nojs.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + \ No newline at end of file