Skip to content

Commit

Permalink
+++
Browse files Browse the repository at this point in the history
  • Loading branch information
Offirmo committed May 13, 2024
1 parent 44df3c2 commit fec5824
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 5 deletions.
5 changes: 4 additions & 1 deletion stack--2022/3-advanced--browser/css--foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
"_start:parcel:storypad": "parcel serve doc/storypad/index.html --port 8080 --lazy --no-autoinstall",
"_start:parcel:demo": "parcel serve --log-level verbose 'doc/demo/*.html' --port 3020 --no-autoinstall",

"dev": "npm-run-all clean--cache --parallel _start:parcel:storypad"
"dev": "npm-run-all clean--cache --parallel _start:parcel:storypad",

"build": "node ./src/~~gen/bundle.mjs"
},

"devDependencies": {
"@offirmo-private/monorepo-scripts": "*",
"@offirmo-private/storypad": "*",
"@offirmo-private/toolbox--parcel": "*",
"lightningcss": "^1",
"npm-run-all": "^4"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* https://lightningcss.dev/bundling.html
*/

import { fileURLToPath } from 'node:url'
import path from 'node:path'

import { bundleAsync } from 'lightningcss'
import * as fs from '@offirmo/cli-toolbox/fs/extra'


/////////////////////////////////////////////////
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const filenameⵧinput = path.join(__dirname, '../index.css')
const filenameⵧoutput = path.join(__dirname, '../../public/index.css')

/////////////////////////////////////////////////

console.log('BUNDLING')
console.log({filenameⵧinput, filenameⵧoutput})

let { code, map } = await bundleAsync({
filename: filenameⵧinput,
minify: true,
//errorRecovery: true,
// todo targets: browserslistToTargets(browserslist('>= 0.25%'))
resolver: {
read(filePath) {
//console.log(`Reading "${filePath}"`)
if (filePath.endsWith(`npm:@offirmo-private/css--reset`))
return ''

return fs.readFileSync(filePath, 'utf8');
},
resolve(specifier, from) {
//console.log(`Resolving`, {specifier, from})
return path.resolve(path.dirname(from), specifier);
}
}
});

//console.log({ code, map })

await fs.outputFile(filenameⵧoutput, code)
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ overworld https://en.wikipedia.org/wiki/Overworld
pacifist run
party
permadeath
permanently missable content
procedural generation
progression system
progression system -- power creep (to avoid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,8 @@ headless = Front-end presentation is completely decoupled from back-end logic/CM
hypermedia
incident management = prepare, detect, triage, mitigate, resolve, learn, remediate https://sre.google/resources/practices-and-processes/incident-management-guide/
infrastructure as code (IaC) https://bluelight.co/blog/best-infrastructure-as-code-tools
ingress egress
ingress/egress = “the act of entering”, “the right of entering”, or “the means of entering”
Integrity
integrity
interview -- manage time: reqts + estimation - 5 min, HLD - 20 min, deep dive - 15 min, roundup - 5 min
interview -- popular problems = designing a URL shortening service, Pastebin, Instagram, Dropbox, Facebook Messenger, Twitter, YouTube/Netflix, Typeahead Suggestion, API Rate Limiter, Twitter Search...
interview -- popular problems = Google products: Google Search, YouTube, Google Photo Sharing and Storage, Google Docs, Google Drive...
Expand Down Expand Up @@ -199,7 +198,7 @@ network model -- TCP/IP -- 3 = internet (IP)
network model -- TCP/IP -- 4 = link (MAC)
network model -- TCP/IP -- 4 = physical
network model -- TCP/IP https://www.geeksforgeeks.org/tcp-ip-model/
nicro-frontend https://micro-frontends.org/ https://the-tractor.store/
micro-frontend https://micro-frontends.org/ https://the-tractor.store/
non-abstract large system design (NALSD) = iterative process for designing, assessing, and evaluating distributed systems
non-abstract large systems design (NALSD) https://sre.google/workbook/non-abstract-design/
numbers everyone should know https://static.googleusercontent.com/media/sre.google/en//static/pdf/rule-of-thumb-latency-numbers-letter.pdf
Expand Down
1 change: 1 addition & 0 deletions stack--2022/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"icepick": "^2",
"indent-string": "^5",
"jsondiffpatch": "^0.6",
"lightningcss": "^1",
"load-json-file": "^7",
"lodash": "^4",
"lodash-es": "^4",
Expand Down
2 changes: 1 addition & 1 deletion stack--2022/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3666,7 +3666,7 @@ lightningcss-win32-x64-msvc@1.24.1:
resolved "https://packages.atlassian.com/api/npm/npm-remote/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.24.1.tgz#bd6b562d902e0f92904ac3754c722d9e63e00480"
integrity sha512-joEupPjYJ7PjZtDsS5lzALtlAudAbgIBMGJPNeFe5HfdmJXFd13ECmEM+5rXNxYVMRHua2w8132R6ab5Z6K9Ow==

lightningcss@^1.22.1:
lightningcss@^1, lightningcss@^1.22.1:
version "1.24.1"
resolved "https://packages.atlassian.com/api/npm/npm-remote/lightningcss/-/lightningcss-1.24.1.tgz#8b86a5ee6e6ae9e035ff92892bd047b8d687581e"
integrity sha512-kUpHOLiH5GB0ERSv4pxqlL0RYKnOXtgGtVe7shDGfhS0AZ4D1ouKFYAcLcZhql8aMspDNzaUCumGHZ78tb2fTg==
Expand Down

0 comments on commit fec5824

Please sign in to comment.