-
Notifications
You must be signed in to change notification settings - Fork 0
feat: theming, layouts, dialog confirmation. #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e4b9cfa
chore: lint staged.
knightedcodemonkey d1873ce
refactor: grid based layout for controls.
knightedcodemonkey 0079a6d
feat: clear dialog confirmation.
knightedcodemonkey fd9e261
feat: layout options.
knightedcodemonkey ed96a82
feat: theming.
knightedcodemonkey b86c864
refactor: address pr comments.
knightedcodemonkey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #!/usr/bin/env sh | ||
| npm exec lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/usr/bin/env sh | ||
| set -e | ||
| npm run lint | ||
| npm run build:esm | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| node_modules | ||
| dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Forget The Build Step: Building A Compiler-as-a-Service Playground | ||
|
|
||
| In modern frontend development, we have normalized a heavy local setup cost. Want JSX and modern CSS dialects? Install a large dependency graph, start a dev server, and wait for transpilation loops before you can really iterate. | ||
|
|
||
| I wanted to test a different path: what if we removed the terminal from the inner loop? | ||
|
|
||
| That experiment became @knighted/develop, a browser-native playground that treats your tab as a real-time compiler host. | ||
|
|
||
| ## The Core Idea | ||
|
|
||
| Most playgrounds rely on a backend build service. @knighted/develop flips that model: | ||
|
|
||
| - JSX compilation and execution happen in the browser. | ||
| - CSS transforms (including CSS Modules, Less, and Sass) run in the browser. | ||
| - Compilers are loaded on demand from CDN sources. | ||
|
|
||
| The result is a development loop that feels direct: type, compile, render, repeat. | ||
|
|
||
| ## The Stack Behind It | ||
|
|
||
| Two libraries power the runtime: | ||
|
|
||
| - @knighted/jsx: JSX that resolves to real DOM nodes. | ||
| - No virtual DOM requirement. | ||
| - You can use declarative JSX and imperative DOM APIs in the same flow. | ||
| - @knighted/css: A browser-capable CSS compiler pipeline. | ||
| - Supports native CSS, CSS Modules, Less, and Sass. | ||
| - Uses WASM-backed tooling for modern transforms. | ||
|
|
||
| Under the hood, the app leans on CDN resolution and lazy loading, so it fetches compiler/runtime pieces only when a mode needs them. | ||
|
|
||
| ## Why "Compiler-as-a-Service"? | ||
|
|
||
| Compiler-as-a-Service here does not mean a remote build cluster. | ||
|
|
||
| It means the service boundary is split between: | ||
|
|
||
| - global CDN infrastructure (module and WASM delivery), and | ||
| - the user device (actual compilation and execution). | ||
|
|
||
| If you switch into Sass mode, the browser loads Sass support. If you stay in native CSS mode, it does not pay that cost. The compiler behaves like an on-demand service, but the work stays local to the tab. | ||
|
|
||
| ## What This Enables | ||
|
|
||
| - Fast feedback loops | ||
| - Rendering updates track edits with minimal overhead. | ||
| - Mixed declarative and imperative workflows | ||
| - Useful for low-level UI experiments and DOM-heavy component prototypes. | ||
| - Isolation testing with ShadowRoot | ||
| - Toggle encapsulation to verify style boundary behavior. | ||
| - Zero install inner loop | ||
| - Open a page and start building. | ||
|
|
||
| ## Why This Matters | ||
|
|
||
| The point is not to replace every production build pipeline. | ||
|
|
||
| The point is to prove a stronger baseline: modern browsers are now capable enough to host substantial parts of the authoring and compile cycle directly, without defaulting to local toolchain setup for every experiment. | ||
|
|
||
| For prototyping and component iteration, that changes the cost model dramatically. | ||
|
|
||
| ## Try It | ||
|
|
||
| - Live playground: https://knightedcodemonkey.github.io/develop/ | ||
| - Source repository: https://github.com/knightedcodemonkey/develop | ||
|
|
||
| ## Notes For Publishing | ||
|
|
||
| If you post this on Medium (or similar), include a short screen recording that shows: | ||
|
|
||
| - switching style modes (CSS -> Modules -> Less -> Sass), | ||
| - toggling ShadowRoot on and off, and | ||
| - immediate preview updates while typing. | ||
|
|
||
| That visual sequence communicates the Compiler-as-a-Service model faster than any architecture diagram. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.