Skip to content

Commit e38bb08

Browse files
committed
Adjustments to #3
1 parent 8961529 commit e38bb08

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Added `{{archive_ext}}` to recognize `.zip` packages on Windows and `.tar.gz` on macOS and Linux.
66
* Fixed error when trying to remove the binary from a previous installation.
77
* Add support for local npm prefix ([#1](https://github.com/go-task/go-npm/pull/1)).
8+
* Added support for [pnpm](https://pnpm.io/) ([#3](https://github.com/go-task/go-npm/pull/3)).
89

910
### (@gzuidhof): MODIFICATIONS FROM BASE `go-npm` PACKAGE
1011
* Support for zip and non-compressed binaries.

Taskfile.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
11
version: '3'
22

33
tasks:
4+
npm:install:
5+
desc: Runs npm install
6+
cmds:
7+
- npm install
8+
sources:
9+
- package.json
10+
- package-lock.json
11+
412
build:
513
desc: Build project using esbuild
14+
deps: [npm:install]
615
cmds:
716
- npm run build
817
sources:
918
- ./src/**/*.js
1019
- package.json
1120
- package-lock.json
21+
generates:
22+
- bin/index.js
1223

1324
publish:
1425
desc: Publish release to npm
1526
deps: [build]
1627
cmds:
1728
- npm publish --access=public
29+
30+
clean:
31+
desc: Clean build files
32+
cmds:
33+
- rm -rf bin/

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@
1818
"url": "https://github.com/go-task/go-npm.git"
1919
},
2020
"homepage": "https://github.com/go-task/go-npm",
21-
"dependencies": {
22-
"used-pm": "^1.0.0"
23-
},
2421
"devDependencies": {
2522
"esbuild": "^0.12.17",
2623
"jest": "^24.5.0",
2724
"mkdirp": "^1.0.4",
2825
"request": "^2.88.2",
2926
"tar": "^2.2.2",
30-
"unzipper": "0.10.10"
27+
"unzipper": "0.10.10",
28+
"used-pm": "^1.0.0"
3129
}
3230
}

src/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { join } = require('path');
22
const { exec } = require('child_process');
33
const { existsSync, readFileSync } = require('fs');
44
const mkdirp = require('mkdirp');
5-
const usedPM =require('used-pm');
5+
const usedPM = require('used-pm');
66

77
// Mapping from Node's `process.arch` to Golang's `$GOARCH`
88
const ARCH_MAPPING = {

0 commit comments

Comments
 (0)