Commit Graph
8 Commits
Author SHA1 Message Date
Kamran Ahmed 75edd1b4bc Restructure as a Turborepo monorepo
packages/driver is the library (still published as driver.js, with
repository.directory set); playground and docs move to apps/. One root
pnpm workspace and lockfile replace the three standalone projects, with
turbo orchestrating build/test/lint:package (apps depend on the library
build; local + CI caching via .turbo).

Apps keep importing the library from source for HMR — the aliases now
point at ../../packages/driver/src and each app gains a workspace:*
dependency so the task graph knows the edge. The dev-server fs scope
widens to the repo root accordingly.

Releases run from packages/driver (root `pnpm release` delegates). The
changelog still lives in the docs app, so the release scripts reach it
via ../../../apps/docs and the after:bump hook stages it explicitly —
release-it no longer sits above both directories.

The merged workspace settings keep sharp unbuilt on purpose (prebuilt
binaries; building from source needs node-gyp and fails) — the docs app
had this right and the playground setting was the accident. postcss and
postcss-scss were unreferenced devDependencies and are dropped; prettier
moves to the root as the only shared tool.
2026-07-16 19:45:23 +01:00
Kamran Ahmed 630adda553 Ship hints as the driver.js/hints entry
Two separate vite runs rather than one multi-entry build. Multi-entry
splits the shared popover primitive into a chunk, which would make the
tour bundle depend on a second file and cost every existing user bytes
for a feature they may never use; it also merged both stylesheets into
driver.css. Standing the entries alone keeps driver.css byte-identical
to master and the tour bundle within ~120 bytes of it, and lets hints be
used without the tour. Importing both duplicates the primitive (~2KB
gzip), which is safe because the copies only handle their own popovers.

The hints run writes to dist-hints/ and the postbuild folds it into
dist/. That indirection is not incidental: vite-plugin-dts takes its
entry from package.json's `types` field when bundling, not from the lib
entry, so pointing it at hints emits the tour's API under the hints name
and overwrites dist/driver.js.d.ts. api-extractor rolls up the hints
declarations from an explicit entry instead.

hints/package.json is a resolution shim for legacy node10, which predates
`exports`; attw is green across node10, node16 ESM/CJS and bundler for
both entries. sideEffects marks only CSS, so bundlers can drop unused
code from either entry.

Sizes (gzip): tour 6.7KB unchanged in CSS and ~6.8KB in JS, hints 4.2KB
JS + 0.4KB CSS standalone.
2026-07-15 04:27:53 +01:00
Kamran Ahmed aa3b624a52 Add basic highlight functionality 2023-05-08 00:26:47 +01:00
Kamran Ahmed 9b9dfac3a9 Update gitignore 2018-10-12 13:57:16 +04:00
Kamran Ahmed b5e621d537 Update ignore files 2018-06-30 12:43:55 +04:00
Kamran Ahmed d52f2d60e7 Update demo and webpack build 2018-03-21 22:47:22 +01:00
Kamran Ahmed d86254cc76 Add basic dev setup 2018-03-03 14:38:14 +01:00
Kamran Ahmed 5f830d1bad Initial commit 2018-03-03 12:52:45 +01:00