-
Notifications
You must be signed in to change notification settings - Fork 30
switch skipruntime-ts to pnpm #974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
dd878da
bad571f
c190dc5
fe5100e
3665663
d6594df
39f0a44
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ dist/ | |
| *.wasm | ||
| target | ||
| **/node_modules/ | ||
| .pnpm-store/ | ||
| .skgw.conf | ||
| bun.lockb | ||
| /www/docs/api/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| # various build systems | ||
|
|
||
| .PHONY: all | ||
| all: npm build/skdb build/init.sql | ||
| all: pnpm build/skdb build/init.sql | ||
|
|
||
| PRETTIER_LOG_LEVEL?=warn | ||
|
|
||
|
|
@@ -19,16 +19,10 @@ export SKIPRUNTIME | |
| # skdb wasm + js client | ||
| ################################################################################ | ||
|
|
||
| .PHONY: npm | ||
| npm: $(SKDB_WASM) build/package/skdb build/package/package.json | ||
| cd build/package && npm install | ||
| .PHONY: pnpm | ||
| pnpm: | ||
| pnpm install && pnpm build | ||
|
|
||
| build/package/package.json: | ||
| @echo "{" > build/package/package.json | ||
| @echo " \"dependencies\": {" >> build/package/package.json | ||
| @echo " \"skdb\": \"file:skdb\"" >> build/package/package.json | ||
| @echo " }" >> build/package/package.json | ||
| @echo "}" >> build/package/package.json | ||
|
Comment on lines
-22
to
-31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something you might be hitting that isn't obvious is that here the npm stuff is referring to the support for using skdb from js using npm packages. |
||
|
|
||
| sql/target/wasm32-unknown-unknown/dev/skdb.wasm: sql/src/* | ||
| cd sql && skargo build --target wasm32-unknown-unknown --bin skdb | ||
|
|
@@ -76,7 +70,7 @@ check: | |
|
|
||
| .PHONY: check-ts | ||
| check-ts: | ||
| npm install | ||
| pnpm install | ||
| bin/check-ts.sh | ||
|
|
||
| .PHONY: check-sh | ||
|
|
@@ -90,7 +84,7 @@ check-sh: | |
| clean: | ||
| rm -Rf build | ||
| find . -name 'Skargo.toml' -print0 | sed 's|Skargo.toml|target|g' | xargs -0 rm -rf | ||
| npm run clean | ||
| pnpm clean | ||
|
|
||
| .PHONY: clean-all | ||
| clean-all: clean | ||
|
|
@@ -125,23 +119,23 @@ check-fmt: | |
| # regenerate api docs served by docs-run from ts sources | ||
| .PHONY: docs | ||
| docs: | ||
| npm install && npm run build | ||
| cd www && rm -rf docs/api && npm install && npx docusaurus generate-typedoc | ||
| pnpm install && pnpm build | ||
| cd www && rm -rf docs/api && pnpm install && npx docusaurus generate-typedoc | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The various |
||
|
|
||
| # run the docs site locally at http://localhost:3000 | ||
| .PHONY: docs-run | ||
| docs-run: # depends on docs, but can't be tracked reliably | ||
| cd www && npm run start | ||
| cd www && pnpm start | ||
|
|
||
| # generate the docs site as static files | ||
| .PHONY: docs-build | ||
| docs-build: docs | ||
| cd www && rm -rf build && npm run build | ||
| cd www && rm -rf build && pnpm build | ||
|
|
||
| # run the static docs site locally | ||
| .PHONY: docs-serve | ||
| docs-serve: # depends on docs-build, but can't be tracked reliably | ||
| cd www && npm run serve | ||
| cd www && pnpm serve | ||
|
|
||
| # update the static docs site repo | ||
| .PHONY: docs-publish | ||
|
|
@@ -229,18 +223,18 @@ build/index.html: sql/js/index.html | |
| cp $^ $@ | ||
|
|
||
| .PHONY: check-vite | ||
| check-vite: npm | ||
| check-vite: pnpm | ||
| rm -rf build/vitejs | ||
| cp -r sql/ts/vitejs build/vitejs | ||
| cd build/vitejs && npm install; | ||
| cd build/vitejs && pnpm install; | ||
| rm -r build/vitejs/node_modules/skdb | ||
| cp -r build/package/skdb build/vitejs/node_modules/ | ||
| cd build/vitejs && npm run build | ||
| cd build/vitejs && pnpm build | ||
| cd build/vitejs && node server.js | ||
| cd build/vitejs && npm run dev | ||
| cd build/vitejs && pnpm dev | ||
|
|
||
| .PHONY: test-bun | ||
| test-bun: npm | ||
| test-bun: pnpm | ||
| rm -rf build/bun | ||
| cp -r sql/ts/bun build/bun | ||
| cd build/bun && bun install; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,5 +12,5 @@ DIRS=$( jq --raw-output ".workspaces[]" package.json ) | |
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that the line above reads the workspaces field of the package.json file that isn't here anymore. |
||
| for dir in $DIRS | ||
| do | ||
| "$SCRIPT_DIR"/cd_sh "$dir" "npm run build --if-present && npm run lint --if-present" | ||
| "$SCRIPT_DIR"/cd_sh "$dir" "pnpm run build --if-present && pnpm run lint --if-present" | ||
| done | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ fi | |
|
|
||
| cd "$SCRIPT_DIR/../" || exit | ||
|
|
||
| make npm | ||
| make pnpm | ||
|
|
||
| make test-wasm | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opinions vary but FWIW I tend to prefer using the long form of options when written out in scripts, etc. to make it easier to read for people who might not have the short forms memorized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. I'll make command line options explicit.