Skip to content

Commit

Permalink
ci: support esm build
Browse files Browse the repository at this point in the history
  • Loading branch information
liaoliaots committed Sep 21, 2024
1 parent b571e84 commit 363838f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ jobs:
architecture: x64
registry-url: 'https://registry.npmjs.org'
- run: pnpm install --frozen-lockfile
- run: pnpm -r run lint
- run: pnpm -r run build
- run: pnpm -F "@liaoliaots/nestjs-redis" run lint
- name: Build for CJS
run: pnpm -F "@liaoliaots/nestjs-redis" run build
- name: Build for ESM
run: |
npm pkg set type=module
pnpm -F "@liaoliaots/nestjs-redis" exec tsc --project tsconfig.esm.json && tsc-alias -p tsconfig.esm.json
# - run: pnpm -r run publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
7 changes: 7 additions & 0 deletions packages/redis/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig.json",
"exclude": ["test", "**/*spec.ts"],
"compilerOptions": {
"outDir": "dist/esm"
}
}

0 comments on commit 363838f

Please sign in to comment.