Render in a browser from the same renderer, with a build step
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, node.js
- Domain
- build-system, tooling
Research direction
Start by reading src/render.js, the Node-dependent feature code in features/tasks/index.js and features/puzzles/index.js, and the preview scripts and src/slides.js named in the issue. Run npm run build to inspect the current build setup, then compare rendering every page in docs/ in Node and from the browser bundle. Done means the bundle renders the same HTML and features do not need separate Node and browser implementations.
Written by the indexing model from the issue text.
Description
Part of #201.
The renderer is markdown-it and the features in features/, and it needs very little of Node:
- Most features read their own stylesheet and preview script with
fs.readFileSync, as tasks does infeatures/tasks/index.js:246. - Puzzles lists its kinds with
fs.readdirSync, infeatures/puzzles/index.js:46. titleOftakes a file's name withpath.basename, insrc/render.js:43.
A build step (esbuild, say) could put those files' text in as strings and the kinds in as a list. Then the same render(source) that the app uses would run in a page, giving { css, body, title }.
With it come static/preview.js, the features' preview scripts, and src/slides.js's pages, so a deck and a workbook work as they do in the app.
This is most of the work for the hosted viewer and the extension. It also means a feature can be picked or left out of a bundle (#141).
Done when
npm run buildwrites a browser bundle of the renderer and the preview frame's scripts.- No feature has to know whether it's running in Node or a browser. The build does the work, not a second copy of a feature.
- A test renders every page in
docs/both ways, in Node and from the bundle, and gets the same HTML.
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 26
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jzheaux/reader
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
accessibility bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
polish
Difficulty 3/5 1-2 days Newbie friendliness 64/100
Maintainers usually reply within 1 day
Similar issues
-
Radix number block generates NaN after switching a negative or decimal number to binary, octal or hexPossibly taken @matthewalberto claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mit-cml/appinventor-sources#4246 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
accessibility good first issue languages
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 2 days
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100