diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 10bf790..c227b91 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -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 }} diff --git a/packages/redis/tsconfig.esm.json b/packages/redis/tsconfig.esm.json new file mode 100644 index 0000000..b05431e --- /dev/null +++ b/packages/redis/tsconfig.esm.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["test", "**/*spec.ts"], + "compilerOptions": { + "outDir": "dist/esm" + } +}