Skip to content

Commit 3cf604c

Browse files
authored
fix: Added node-prune back into the pipeline to reduce the package size (#244)
1 parent e297a74 commit 3cf604c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
with:
3535
node-version: '16'
3636
cache: 'npm'
37+
3738
- name: Build
3839
id: build
3940
run: |
@@ -63,6 +64,7 @@ jobs:
6364
with:
6465
node-version: '16'
6566
cache: 'npm'
67+
6668
- name: Test
6769
run: |
6870
npm install
@@ -92,6 +94,11 @@ jobs:
9294
node-version: '16'
9395
cache: 'npm'
9496

97+
- name: Install Go
98+
uses: actions/setup-go@v2
99+
with:
100+
go-version: '^1.17.7'
101+
95102
- name: Embed octo portable
96103
run: |
97104
pwsh ./embed-octo.ps1

pack.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ function SetupTaskDependencies($workingDirectory) {
6060
mkdir "$tempPath/node_modules"
6161
& npm install --prefix $tempPath azure-pipelines-task-lib azure-pipelines-tool-lib
6262
& npm dedup --prefix $tempPath
63+
& go install github.com/tj/node-prune@latest
64+
65+
$goPath = go env GOPATH
66+
$command = "$goPath/bin/node-prune"
67+
68+
Invoke-Expression "$command $tempPath/node_modules"
6369

6470
$taskManifestFiles = Get-ChildItem $workingDirectory -Include "task.json" -Recurse
6571

0 commit comments

Comments
 (0)