Skip to content

Commit

Permalink
💚 use yarn option to package extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Mar 10, 2024
1 parent be2d5c2 commit bc04e2e
Show file tree
Hide file tree
Showing 4 changed files with 9,188 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
npm install -f esbuild
- name: Package the extension
run: cd extensions/vscode && npx vsce package --target ${{ env.target }}
run: cd extensions/vscode && npx vsce package --yarn --target ${{ env.target }}

# 5. Upload the .vsix as an artifact
- uses: actions/upload-artifact@v2
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ jobs:
shell: pwsh
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV

- name: L S
run: |
ls core/node_modules/@mozilla/readability
- name: Prepackage the extension
run: |
cd extensions/vscode
Expand Down Expand Up @@ -139,7 +135,7 @@ jobs:
npm install -f esbuild
- name: Package the extension
run: cd extensions/vscode && npx vsce package --pre-release --target ${{ env.target }}
run: cd extensions/vscode && npx vsce package --yarn --pre-release --target ${{ env.target }}

# 5. Upload the .vsix as an artifact
- uses: actions/upload-artifact@v2
Expand Down
7 changes: 4 additions & 3 deletions extensions/vscode/scripts/prepackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ if (args[2] === "--target") {
await Promise.all(
NODE_MODULES_TO_COPY.map(
(mod) =>
new Promise((resolve, reject) =>
new Promise((resolve, reject) => {
fs.mkdirSync(`out/node_modules/${mod}`, { recursive: true });
ncp(
`node_modules/${mod}`,
`out/node_modules/${mod}`,
Expand All @@ -331,8 +332,8 @@ if (args[2] === "--target") {
resolve();
}
},
),
),
);
}),
),
);
console.log(`[info] Copied ${NODE_MODULES_TO_COPY.join(", ")}`);
Expand Down
Loading

0 comments on commit bc04e2e

Please sign in to comment.