diff --git a/.gitignore b/.gitignore index 021fc6ae..3239e506 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -# for build -css/xterm.css -js/xterm*.js* -js/aalib.js* +# Everything `npm run build` produces — vendor assets, the app bundle, and the +# static mirror — lands here. It is the Netlify publish directory and is never +# committed, so generated files cannot drift from config/*.js. +dist/ images/*Zone.Identifier diff --git a/README.md b/README.md index 5ddaf10d..b6d8ccda 100644 --- a/README.md +++ b/README.md @@ -85,13 +85,23 @@ Future project: get the Hello Worlds working for every portfolio company with a - zed ## Build Notes -Run `npm run build` before serving the site locally or deploying. +`npm run build` produces `dist/`, which is what Netlify publishes. It is wiped +and rebuilt from scratch each time, and it is gitignored — no build output is +ever committed. -That build now: +That build: + - copies the static assets (`images/`, `videos/`, `css/`, `welcome.htm`, and the + `config/*.js` files `welcome.htm` loads directly) - copies and minifies the xterm vendor assets - - bundles the app boot/runtime code into `js/app.bundle.js` + - bundles the app boot/runtime code into `dist/js/app.bundle.js` - emits a minified lazy-load asset for the RickRoll animation - - generates the static mirror (see below) + - generates the static mirror and `dist/index.html` (see below) + +Anything not on the copy list in `scripts/build-assets.js` stays out of `dist/`, +so `scripts/`, `tests/`, `package.json`, and the unbundled `js/` sources are not +served. + +`npm start` builds and then runs `netlify dev` against `dist/`. ## The static mirror The terminal renders its content only when someone types a command, so search @@ -103,16 +113,20 @@ same `config/*.js` data as plain HTML at real URLs: robots.txt sitemap.xml llms.txt llms-full.txt ``` -**`config/*.js` is the only source of truth — never edit the generated files.** -Changing a portfolio description regenerates that company's page, both indexes, -the sitemap, the llms files, and the `