mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-29 03:26:25 -04:00
feat(bin): add CLI
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
"files": [
|
||||
"lib"
|
||||
],
|
||||
"bin": "lib/bin/pnpm-reporter-default.js",
|
||||
"scripts": {
|
||||
"test": "tslint -c tslint.json --project .",
|
||||
"tsc": "rimraf lib && tsc",
|
||||
@@ -27,7 +28,9 @@
|
||||
"homepage": "https://github.com/pnpm/pnpm-reporter-default#readme",
|
||||
"dependencies": {
|
||||
"@types/chalk": "^0.4.31",
|
||||
"@types/node": "^7.0.0",
|
||||
"chalk": "^1.1.3",
|
||||
"ndjson": "^1.5.0",
|
||||
"observatory": "^1.0.0",
|
||||
"pnpm-logger": "^0.0.0"
|
||||
},
|
||||
|
||||
9
src/bin/pnpm-reporter-default.ts
Normal file
9
src/bin/pnpm-reporter-default.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
import ndjson = require('ndjson')
|
||||
import reporter from '..'
|
||||
|
||||
process.stdin.resume()
|
||||
process.stdin.setEncoding('utf8')
|
||||
const streamParser = process.stdin
|
||||
.pipe(ndjson.parse())
|
||||
reporter(streamParser)
|
||||
@@ -22,6 +22,7 @@
|
||||
"rewriteTsconfig": true
|
||||
},
|
||||
"files": [
|
||||
"src/bin/pnpm-reporter-default.ts",
|
||||
"src/index.ts",
|
||||
"typings/index.d.ts",
|
||||
"typings/local.d.ts"
|
||||
|
||||
5
typings/local.d.ts
vendored
5
typings/local.d.ts
vendored
@@ -2,3 +2,8 @@ declare module 'observatory' {
|
||||
const anything: any;
|
||||
export = anything;
|
||||
}
|
||||
|
||||
declare module 'ndjson' {
|
||||
const anything: any;
|
||||
export = anything;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user