PD build / builder v0
Aka: Deployer, pre-processor, CI/CD (kinda sorta)
tl;dr: Just-In-Time (JIT) to Ahead-of-Time (AOT).
Let's move boring (static/low, non-user-unique) Just-In-Time (JIT) client rendered mutations to cached results, compiled ... using the browser!
Pros
- Reduces init/CPU time on per-client basis
- Reduces necessary client JavaScript
- Reduced network transfer (JS)
Potential issues / Unanswered questions
-
Potentially additional network transfer (ex. pre-rendered markdown) - SOLVE: If this becomes a major issue in some modules, we could add an additional qualifier somewhere (module meta data, build logic).
-
Increased cardinality, less global/public CDN friendly -
What is the client CPU v. network use balancing point? Answered #31 (comment 344707369) -
Is it something a majority of users would use? Should it be limited to ed::Pro and above? -
Naming... 'bake' a site feels right?
Browser based developer build tool
-
Disable 'debug' mode -
Settings -
Manifest 'scope' to match root
-
-
? Let's Enhance 2.0 for graphics upscaling -
Wait for init completion -
Grab resulting HTML - Add
<link rel=
preconnect
/dns-prefetch>
for 3rd party CDNs - ? https://github.com/chrisvfritz/prerender-spa-plugin
- Add
-
<link rel='preload'>
for critical path first-load items such as fonts -
Create bundle? Domain specific (eg. d::Library v d::Framework) -
??? -
Profit
?
CLI-
pdb
pagedriver build d::L+F -
pdd
pagedriver deploy d::Platform
CI
-
? SnowPack -
ESBuild -
Minify JS, CSS, HTML --minify
-
Syntax polyfills --target es2016
-
Remove debug in prod --define:pd.DEBUG=false
-
Source map --sourcemap
(link to #100 (closed))
-
-
CSS modifier ed::Pro -
padding/margin to margin-inline/block etc -
Missing browser specific properties -
Automatic CSS prop declaration deduping? Tricky since specificity must be maintained. -
https://www.npmjs.com/package/autoprefixer
-
-
Lighthouse
Cache
-
? Default i18n language? #27 #76 -
#60 Module results (i18n, forms, ...) -
Init generated content such as closeable
close buttons,DOM.codeSample
,DOM.markdown
#104 (closed) etc -
'Static' remote includes -
Combine related SVGs (into sprites?) Eg. FA icons, to remove JS dependency #38 -
Tinify images -
https://blurha.sh/
CD
-
Pagedriver d::Platform -
GitHub d::Library -
GitLab d::Library -
Vercel d::L+F -
RAISH d::L+F
Edited by Lorin Halpert