Closed
Description
We have some baggage,
- support for CommonJS build from ES Modules, and code that is CommonJS
- old code to support ancient browsers like IE 11, which is dead
- experimental and incomplete SSR that no one has had been interested in or had time for finishing, and some of us believe there is a better way forward
- old
.styl
syntax for our CSS. CSS has lots of new language features, including CSS Nesting which is out in all browser (Firefox with a flag), container queries, etc.
I propose:
v5
(Any chained pull requests are in the same order as in this list)
- delete SSR #2105
- Get rid of CommonJS module format, use only ES Modules. #2102
- Delete example tests. We have Jest and Playwright documentation for that.
- Update Rollup, remove Buble, we'll write reasonably modern code (other people with old browser requirements can easily rollup/webpack their own Docsify, but IE is completely dead). chore: update rollup #2109
- Modernize source code (besides module format):
- In a first PR, remove polyfills, use newer language features, drop support for IE (IE is dead!). pull request #2114
- In a second PR refactor some "private" function-based class methods to not use
.call
, but rather be private methods. refactor: move some functions and module-level state into classes as private methods and properties to start to encapsulate Docsify #2136- This is in a separate PR because it will move code around, while the first PR will only have inline replacements like
var
->const
, orfor(;;)
->for(of)
, so it will be easier to review them sepately
- This is in a separate PR because it will move code around, while the first PR will only have inline replacements like
- Ensure all code is auto-formatted. Ensure code format #2138
Future release if not v5
Non breaking changes:
- Bring docsify-cli into this repo for easier development. #2277
- Update from deprecated ESLint v8 config format to the new v9 "flat config" format that now supports ES Modules.
- We can't convert until our plugins support the new format.
- For now, we use .eslintrc.cjs, which is still in CommonJS format.
- See the following for migration:
Potentially Breaking changes:
- We have both
/index.html
anddocs/index.html
. Do we need duplicate code? Delete one. - Update dependencies so that we can delete CommonJS from Rollup config
- Delete Stylus, write vanilla CSS (using postcss for now only until CSS Nesting lands in Firefox). These changes should be backwards compatible for docsify-themeable. Someone with a build system might consume these files, so major version bump.
- Convert DOM creation/manipulation parts to Solid.js. We'll replace the first attempt at convert DOM creation/manipuation code to concise Solid JSX #1716 with a new one. Someone with a build might need an update, so major bump. Most people will be unaffected.
- Solid has several features including reactivity primitives, a component system, and DOM templating. For this task, we will use Solid's component system and templating to encapsulate the DOM parts of Docsify, and output the DOM in a nicer way that will set us up for a better SSR and SSG future.
- f.e.
const div = <div>Some <span>{content}</span></div> // returns an HTMLDivElement.
- Possibly convert to TypeScript? Have the best intellisense and self-documented code! (Eventually I need to convert to a strict type-safe subset of TypeScript to compile it to WebAssembly). Someone building source may break, so major bump.
Metadata
Metadata
Assignees
Labels
No labels