File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1818 "docs:start" : " pnpm --filter docs start" ,
1919 "docs:clear" : " pnpm --filter docs clear" ,
2020 "demos:link" : " tsc -b scripts && node scripts/dist/demos-use-workspace.js" ,
21+ "demos:update" : " tsc -b scripts && node scripts/dist/bump-demo-packages.js" ,
2122 "format" : " prettier --write ." ,
2223 "lint" : " eslint ." ,
2324 "release" : " pnpm build:packages:prod && pnpm changeset publish" ,
Original file line number Diff line number Diff line change 11/**
2- * Users want to be able to run 'pnpm build:packages', cd into a demo,
3- * run 'pnpm install && pnpm build', and have just that demo's packages
4- * installed. Currently, this is not possible, as demos are included in
5- * the pnpm workspace and therefore all demos' packages will be installed.
2+ * This script is for use by SDK devs who want to test their local
3+ * package changes against the demo apps.
64 *
7- * This script goes through every package in 'demos/*' and replaces the
8- * workspace packages' versions with 'workspace:*', allowing for easy
9- * testing of new versions for SDK developers, as well as small
10- * node_modules folders for SDK users.
11- *
12- * This way, users can use 'pnpm --ignore-workspace install && pnpm build',
13- * while SDK devs can use 'tsx ./scripts/link-demos.ts' to build demos.
14- *
15- * Most of this code is copied from './scripts/isolated-demo-test.ts'.
5+ * Make sure to add ` - demos/*` to the root pnpm-workspace.yaml.
6+ * If you want to restore the demos' package.json versions, either run
7+ * `git restore demos`, or run `pnpm demos:update` if you have made
8+ * other modifications to the package.json.
169 */
1710
1811import { findWorkspacePackages } from '@pnpm/workspace.find-packages' ;
You can’t perform that action at this time.
0 commit comments