Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/snippets/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Setup

1. From the stripe-node root folder, run `yarn build` to build the modules.
1. From the stripe-node root folder, run `just build` or `just build-dev` to build the modules. `just build-dev` produces source maps for each of the SDK .ts files. This is optional but very useful when troubleshooting SDK behavior.
2. Then, from this snippets folder, run `yarn` to install node dependencies for the example snippets. This will reference the local Stripe SDK modules created in step 1.

If on step 2 you see an error `Error: unsure how to copy this: /Users/jar/stripe/sdks/node/.git/fsmonitor--daemon.ipc`:
Expand Down
11 changes: 7 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,23 @@ integrations-test: build
# run the full test suite; you probably want `test`
ci-test: install test types-test integrations-test

_build mode packageType: install
_build mode packageType tscArgs: install
mkdir -p {{ mode }}
tsc -p tsconfig.{{ mode }}.json
tsc -p tsconfig.{{ mode }}.json {{ tscArgs }}
echo '{"type":"{{ packageType }}"}' > {{ mode }}/package.json

[private]
build-esm: (_build "esm" "module")
build-esm *args="": (_build "esm" "module" args)

[private]
build-cjs: (_build "cjs" "commonjs")
build-cjs *args="": (_build "cjs" "commonjs" args)

# generate CJS and ESM versions of the package; mostly used as a pre-req for other steps
build: build-esm build-cjs

# generate CJS and ESM versions of the package including sourceMaps for each build
build-dev: (build-esm "--sourceMap" "true") (build-cjs "--sourceMap" "true")

# ⭐ run style checks, fixing issues if possible
lint: (lint-check "--fix")

Expand Down
Loading