FE-M0-04 · Components, icons, number formats and t()
ID FE-M0-04 · Level L0 · Run order row 24
The Opleet components, the icon registry, lib/format and lib/i18n are in apps/web, tested and typechecked; committed.
Before
Section titled “Before”FE-M0-03 is Done. You are on the branch web/design-system.
1 · Lucide, pinned to the version the design system uses
Section titled “1 · Lucide, pinned to the version the design system uses”pnpm --filter web add -E lucide-react@0.460.02 · Copy this step's files: twelve components, the icon registry, lib/format.ts with its test, and lib/i18n.ts. Then the test script; apps/web becomes an ES module package so Node runs the tests without a warning
Section titled “2 · Copy this step's files: twelve components, the icon registry, lib/format.ts with its test, and lib/i18n.ts. Then the test script; apps/web becomes an ES module package so Node runs the tests without a warning”cp -R ~/opleet-v2/packs/fe-pack-a/FE-M0-04/. .pnpm --dir apps/web pkg set type=module scripts.test="node --test 'lib/**/*.test.ts'"3 · Test, typecheck and lint
Section titled “3 · Test, typecheck and lint”pnpm --filter web testpnpm --filter web typecheckpnpm lint4 · Commit
Section titled “4 · Commit”git add -A apps/web pnpm-lock.yamlgit commit -m "feat(web): port the Opleet components and number formats"Expect
Section titled “Expect”- Block 1: “Packages: +1”, then “Done”.
- Block 3: “ℹ tests 4”, “ℹ pass 4” and “ℹ fail 0”; typecheck without errors; “No fixes applied.”
- Block 4: the commit line with 18 files changed.
ls apps/web/components/opleetgrep lucide-react apps/web/package.jsonExpect: Avatar, Badge, Button, DataTable, GlassCard, Icon, IconButton, Input, Logo, Select, StatCard and Toast (.tsx) and cx.ts; then "lucide-react": "0.460.0".
If it fails
Section titled “If it fails”- A format test fails: stop and paste it. Money formatting must be right before anything uses it.
- pnpm warns about a React peer range for lucide-react: harmless. An error is not: paste it.
git reset --hardgit clean -fd apps/webpnpm installBefore the commit. After it: git reset --hard HEAD~1, then pnpm install.
Done 2026-10-06 (zuki)