|
91 | 91 | Notes, |
92 | 92 | DefaultTemplate, |
93 | 93 | SlideLayout, |
| 94 | + SpectacleLogo, |
94 | 95 | } from "spectacle"; |
95 | 96 |
|
96 | 97 | import { theme, colors } from "./deck/theme.js"; |
|
112 | 113 | ><${IconHtm} name=${name} fill=${fill} |
113 | 114 | /></a> |
114 | 115 | `; |
| 116 | + const mdEmphasis = (text) => |
| 117 | + `<span style="color: ${theme.colors.secondary};">${text}</span>`; |
115 | 118 |
|
116 | 119 | const template = html` <${DefaultTemplate} />`; |
117 | 120 | const examples = await getExamples(); |
|
194 | 197 | </${Text}> |
195 | 198 | </${FlexBox}> |
196 | 199 | </${Slide}> |
| 200 | + <${Slide}> |
| 201 | + <${FlexBox} height="100%"> |
| 202 | + <${Link} href="https://nearform.com/open-source/spectacle"> |
| 203 | + <${SpectacleLogo} size=${500} /> |
| 204 | + </${Link}> |
| 205 | + </${FlexBox}> |
| 206 | +
|
| 207 | + </${Slide}> |
197 | 208 | <${MarkdownSlideSet}> |
198 | 209 | ${` |
199 | 210 | --- |
|
232 | 243 | `} |
233 | 244 | </${MarkdownSlideSet}> |
234 | 245 | ${examples.legacy.slides} |
235 | | - <${MarkdownSlideSet}> |
| 246 | + <${MarkdownSlideSet} animateListItems=${true}> |
236 | 247 | ${` |
237 | 248 | --- |
238 | 249 | # And then ... |
239 | 250 |
|
240 | | - * **2001**: JSMin is introduced |
241 | | - * **2010-2015**: The bundlers (_2010_: RequireJS, _2011_: Browserify, _2012_: Webpack, ...) |
242 | | - * **2015-on**: The modern bundlers (_2015_: Rollup, _2017_: Parcel, _2020_: Vite, ...) |
| 251 | + * **2001**: A ${mdEmphasis("**minifier**")}! (_JSMin_) |
| 252 | + * **2010-2015**: ${mdEmphasis("**Bundlers**")}! |
| 253 | + * _RequireJS_, _Browserify_, _Webpack_, ... |
| 254 | + <!-- (_2010_: RequireJS, _2011_: Browserify, _2012_: Webpack, ...) --> |
| 255 | + * **2015-on**: ${mdEmphasis("**Fancier bundlers**")} |
| 256 | + * _Rollup_, _Parcel_, _Vite_, ... |
| 257 | + <!-- (_2015_: Rollup, _2017_: Parcel, _2020_: Vite, ...) --> |
243 | 258 |
|
244 | 259 | --- |
245 | 260 | # And now... |
|
264 | 279 | * This is just a timeline and greatest hits. |
265 | 280 | * Skipping over a ton of technical detail. |
266 | 281 | * Most large scale web apps probably still **need builds** |
267 | | - * We cheat (✨) ${iconArrow} _Buildless_ still runs **builds** |
| 282 | + * We cheat! (✨) ${iconArrow} _Buildless_ still runs **builds** |
268 | 283 |
|
269 | 284 | --- |
270 | 285 | # The Interesting Parts |
|
275 | 290 | * What can you actually get away with? ${iconArrow} |
276 | 291 | React? TypeScript? |
277 | 292 |
|
278 | | - --- |
| 293 | + --- { "layout": "center" } |
279 | 294 | # Another timeline... |
280 | 295 |
|
281 | | - * **2015**: ECMAScript Modules (ESM) released |
282 | | - * **2018**: \`es-module-shims\` started |
283 | | - * **2021**: Import Maps start to be supported |
284 | | - * TODO: Insert these in!!! |
285 | | - * _2017_: unpkg.com module flag, _2020_: esm.sh, _2017_: jspm.io, etc. |
286 | | - * _2018_: Deno, _2022_: Bun |
| 296 | + That's a bit less well-known and a bit bumpy... |
| 297 | +
|
| 298 | + --- |
| 299 | + # **2015**: ECMAScript Modules (ESM) |
| 300 | +
|
| 301 | + Named exports |
| 302 | +
|
| 303 | + \`\`\`js |
| 304 | + export const users = [ ... ]; |
| 305 | + \`\`\` |
| 306 | +
|
| 307 | + Static and dynamic imports |
| 308 | + \`\`\`js |
| 309 | + // Static import |
| 310 | + import { users } from "./users.js"; |
| 311 | +
|
| 312 | + // Dynamic import |
| 313 | + const { users } = await import("./users.js"); |
| 314 | + \`\`\` |
| 315 | +
|
| 316 | + --- { "layout": "center" } |
| 317 | + # Let's see it! |
| 318 | +
|
287 | 319 | `} |
288 | 320 | </${MarkdownSlideSet}> |
289 | 321 | ${examples.modern.slides} |
290 | 322 | <${MarkdownSlideSet}> |
291 | 323 | ${` |
| 324 | + --- { "layout": "center" } |
| 325 | + # Yay! |
| 326 | +
|
| 327 | + --- { "layout": "center" } |
| 328 | + # Ok, then we hit all the hard parts... |
| 329 | +
|
| 330 | + --- |
| 331 | + # **2018**: Import Maps |
| 332 | +
|
| 333 | + The problem |
| 334 | +
|
| 335 | + \`\`\`js |
| 336 | + import lodash from "lodash"; |
| 337 | + \`\`\` |
| 338 | +
|
| 339 | + The solution |
| 340 | +
|
| 341 | + \`\`\`html |
| 342 | + <${""}script type="importmap"> |
| 343 | + { |
| 344 | + "imports": { |
| 345 | + "lodash": "https://esm.sh/lodash@^4.17.21" |
| 346 | + } |
| 347 | + } |
| 348 | + <${""}/script> |
| 349 | + \`\`\` |
| 350 | +
|
292 | 351 | --- |
293 | | - # Some initial challenges |
| 352 | + # **2018**: Import Maps II |
| 353 | +
|
| 354 | + The problem: ${mdEmphasis("**NONE OF THAT IS IMPLEMENTED YET**")} |
| 355 | +
|
| 356 | + The solution: ${icon("github-logo")}[\`es-module-shims\`](https://github.com/guybedford/es-module-shims) |
294 | 357 |
|
295 | | - * Naming (\`next\`, \`lodash\`) ${iconArrow} |
296 | | - Import Maps |
297 | | - * The React problem (CommonJS vs. ESM) ${iconArrow} |
298 | | - ESM-savvy CDNs (✨) |
299 | | - * JSX? ${iconArrow} Meet [htm](https://github.com/developit/htm) (✨) |
| 358 | + \`\`\`html |
| 359 | + <!-- ✨ Checkout the '-shim' suffix --> |
| 360 | + <${""}script type="importmap-shim"> |
| 361 | + { |
| 362 | + "imports": { |
| 363 | + "lodash": "https://esm.sh/lodash@^4.17.21" |
| 364 | + } |
| 365 | + } |
| 366 | + <${""}/script> |
| 367 | + \`\`\` |
| 368 | +
|
| 369 | + --- |
| 370 | + # **2021**: Import Maps III |
| 371 | +
|
| 372 | + OK, now they finally start to be supported. |
| 373 | +
|
| 374 | + --- |
| 375 | + # **2017+**: CDNs |
| 376 | +
|
| 377 | + The problem: \`react\` only ships CommonJS. |
| 378 | +
|
| 379 | + The solution: CDNs get more savvy with lazy ESM conversion (✨). |
| 380 | +
|
| 381 | + Enter \`esm.sh\`, \`jspm.io\`, \`unpkg.com\`, ... |
| 382 | +
|
| 383 | + <!-- _2017_: unpkg.com module flag, _2020_: esm.sh, _2017_: jspm.io, etc. --> |
| 384 | + <!-- _2018_: Deno, _2022_: Bun --> |
| 385 | +
|
| 386 | + --- { "layout": "center" } |
| 387 | + # Let's ship a React app! |
300 | 388 |
|
301 | 389 | `} |
302 | 390 | </${MarkdownSlideSet}> |
303 | 391 | ${examples.react.slides} |
304 | | - <${MarkdownSlideSet}> |
| 392 | + <${MarkdownSlideSet} animateListItems=${true}> |
305 | 393 | ${` |
| 394 | + --- { "layout": "center" } |
| 395 | + # How about the real world? |
| 396 | +
|
306 | 397 | --- |
307 | 398 | # Performance |
308 | 399 |
|
|
339 | 430 | - DOM: 139 ms |
340 | 431 | - Load: 139 ms |
341 | 432 |
|
342 | | - --- |
| 433 | + --- { "layout": "center" } |
| 434 | + # What comes next? |
343 | 435 |
|
344 | | - # The future... |
| 436 | + We've seen the ESM-friendly world of the present. |
345 | 437 |
|
346 | | - * Runtimes / "the platforms" continue to evolve |
347 | | - * _Frontend_: \`es-module-shims\`, Web Components |
348 | | - * _Backend_: Node.js, Deno, Bun |
349 | | - * TypeScript, WASM |
350 | | - * Where might we head next? |
| 438 | + Where might we head next? |
351 | 439 |
|
| 440 | + Notes: \ |
| 441 | + Technologies and companies like es-module-shims, JSPM, etc. are \ |
| 442 | + really pushing how much you can do without a build. |
| 443 | +
|
| 444 | + --- { "layout": "center" } |
| 445 | + # What can we get away with? |
352 | 446 | `} |
353 | 447 | </${MarkdownSlideSet}> |
354 | 448 | ${examples.typescript.slides} |
355 | 449 | <${MarkdownSlideSet}> |
356 | 450 | ${` |
357 | | - --- |
358 | | - # TODO: Content Notes |
359 | | -
|
360 | | - * More on es-import-shims future and browser directions |
361 | | - * Folks like JSPM, etc. are really pushing how much you can do without a build. |
362 | | - * Maybe a slide / quick analysis of perf |
363 | | - * This presentation! |
364 | | - * blogs-ai app |
365 | | - * ... |
366 | | -
|
367 | | - --- |
368 | | - # TODO: Design Notes |
| 451 | + --- { "layout": "center" } |
| 452 | + # Go play around! |
369 | 453 |
|
370 | | - * Fun background images. |
371 | | - * Use other typography for bigger single message (centered) slides |
| 454 | + ${icon("browser")} [ryan-roemer.github.io/a-world-without-builds](https://ryan-roemer.github.io/a-world-without-builds/) |
372 | 455 |
|
373 | | - --- |
374 | | - # TODO: This deck |
| 456 | + ${icon("github-logo")} [ryan-roemer/a-world-without-builds](https://github.com/ryan-roemer/a-world-without-builds) |
375 | 457 |
|
376 | | - * Spectacle link |
377 | | - * This deck link |
378 | | - * Look at the import map |
| 458 | + Notes: \ |
| 459 | + You've probable guessed the spoiler here...\ |
| 460 | + This Spectacle deck is a no-build React application that uses htm! |
379 | 461 |
|
380 | 462 | --- { "layout": "center" } |
381 | | - # TODO: Thanks |
382 | | -
|
383 | | - [ryan-roemer.github.io/a-world-without-builds](https://ryan-roemer.github.io/a-world-without-builds/) |
| 463 | + # Thanks! |
384 | 464 |
|
385 | | - ${icon("github-logo")} [ryan-roemer/a-world-without-builds](https://github.com/ryan-roemer/a-world-without-builds) |
386 | 465 | ${icon("twitter-logo")} [@ryan_roemer](https://x.com/ryan_roemer) |
387 | 466 | ${icon("butterfly")} [@ryan-roemer.bsky.social](https://bsky.app/profile/ryan-roemer.bsky.social) |
388 | 467 | ${icon("linkedin-logo")} [in/ryanroemer](https://www.linkedin.com/in/ryanroemer/) |
|
0 commit comments