Skip to content

Commit

Permalink
Add two separate builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanduplenskikh committed Nov 13, 2024
1 parent a5efcb4 commit 9128c98
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ jobs:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build external case
run: node build-ext.mjs
- name: Build internal case
run: node build.mjs
- name: Remove node_modules
run: rm -rf node_modules
- name: Run without the shelljs module as external
run: npm run start
run: node dist/index.js
- name: Run with the shelljs module as external
run: npm run start-ext
run: node dist/index-ext.js
if: failure()
2 changes: 1 addition & 1 deletion build-ext.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { build } from 'esbuild'

await build({
entryPoints: ['./src/index.js'],
outfile: './dist/index.js',
outfile: './dist/index-ext.js',
bundle: true,
platform: "node",
target: "node16",
Expand Down

0 comments on commit 9128c98

Please sign in to comment.