Skip to content

Commit b39846a

Browse files
authored
chore(dev): add web platform dev.yml commands (#158)
### What changes are you making? Adds platforms/web to the root dev.yml. `dev up` registers platforms/web under the Node/pnpm bootstrap and runs pnpm install when node_modules is missing. `dev check` adds `web-lint` (pnpm lint) and `web-test` (pnpm test). `dev web` commands wrap existing package.json scripts: Command | Action -- | -- dev web sample (s) | Start the sample app dev server dev web build | Build @shopify/checkout-kit to dist/ dev web test | Run unit tests with coverage dev web test watch | Run tests in watch mode dev web lint (style) | Typecheck, oxlint, and format check dev web format (fix) | Auto-fix lint and formatting dev web clean | Remove dist/ and coverage/ </div></div></div> ### Before you merge > [!IMPORTANT] > > - [ ] I've added tests to support my implementation > - [ ] I have read and agree with the [Contribution Guidelines](./CONTRIBUTING.md) > - [ ] I have read and agree with the [Code of Conduct](./CODE_OF_CONDUCT.md) > - [ ] I've updated the relevant platform README (`platforms/swift/README.md` and/or `platforms/android/README.md`) --- <details> <summary>Releasing a new Swift version?</summary> - [ ] I have bumped the version in `ShopifyCheckoutKit.podspec` - [ ] I have bumped the version in `platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift` - [ ] I have updated `platforms/swift/CHANGELOG.md` - [ ] I have updated the SwiftPM/CocoaPods version snippets in `platforms/swift/README.md` (major version only) </details> <details> <summary>Releasing a new Android version?</summary> - [ ] I have bumped the `versionName` in `platforms/android/lib/build.gradle` - [ ] I have updated `platforms/android/CHANGELOG.md` - [ ] I have updated the Gradle/Maven version snippets in `platforms/android/README.md` </details> > [!TIP] > See the [Contributing documentation](./CONTRIBUTING.md) for the full release process per platform.
1 parent 3782251 commit b39846a

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

dev.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ up:
5757
package_manager: pnpm@10.33.1
5858
packages:
5959
- platforms/react-native
60+
- platforms/web
6061
- custom:
6162
name: Install NPM dependencies (React Native)
6263
met?: ls -l platforms/react-native | grep node_modules
6364
meet: cd platforms/react-native && pnpm install
65+
- custom:
66+
name: Install NPM dependencies (Web)
67+
met?: ls -l platforms/web | grep node_modules
68+
meet: cd platforms/web && pnpm install
6469
- custom:
6570
name: Install gems (React Native sample)
6671
met?: (cd platforms/react-native/sample/ios && bundle check)
@@ -79,6 +84,8 @@ check:
7984
react-native-lint-swift: cd platforms/react-native && ./scripts/lint_swift
8085
react-native-lint-module: cd platforms/react-native && pnpm module lint
8186
react-native-lint-sample: cd platforms/react-native && pnpm sample lint
87+
web-lint: cd platforms/web && pnpm lint
88+
web-test: cd platforms/web && pnpm test
8289

8390
commands:
8491
# Repo-wide
@@ -283,3 +290,37 @@ commands:
283290
desc: Auto-fix Swift lint and format issues
284291
aliases: [fix]
285292
run: cd platforms/react-native && ./scripts/lint_swift fix
293+
294+
# Web
295+
web:
296+
desc: "Web Checkout Kit commands"
297+
subcommands:
298+
sample:
299+
desc: Start the sample app dev server
300+
aliases: [s]
301+
run: cd platforms/web && pnpm sample
302+
build:
303+
desc: Build the @shopify/checkout-kit package
304+
run: cd platforms/web && pnpm build
305+
test:
306+
desc: Run unit tests with coverage
307+
run: cd platforms/web && pnpm test
308+
subcommands:
309+
watch:
310+
desc: Run tests in watch mode
311+
run: cd platforms/web && pnpm test:watch
312+
lint:
313+
desc: Run typecheck, oxlint, and format checks
314+
aliases: [style]
315+
run: cd platforms/web && pnpm lint
316+
format:
317+
desc: Auto-fix JS lint and formatting issues
318+
aliases: [fix]
319+
run: |
320+
set -e
321+
cd platforms/web
322+
pnpm run lint:js:fix
323+
pnpm run format
324+
clean:
325+
desc: Remove dist and coverage directories
326+
run: cd platforms/web && pnpm clean

0 commit comments

Comments
 (0)