Skip to content

Commit

Permalink
[change] Adapt to executable
Browse files Browse the repository at this point in the history
  • Loading branch information
nwtgck committed Sep 22, 2018
1 parent fbbaeda commit 8d021c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# index.ts has a shebang, "#!/usr/bin/env node", so it is regarded as JS
src/index.ts linguist-language=TypeScript
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "piping-server",
"version": "0.2.0",
"description": "HTTP Piping Data Transfer Server",
"main": "dist/lib/index.js",
"types": "dist/lib/index.d.ts",
"bin": {
"piping-server": "dist/src/index.js"
},
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"scripts": {
"build": "tsc",
"start": "npm run build && node dist/src/index.js",
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/usr/bin/env node
// (from: https://qiita.com/takayukioda/items/a149bc2907ef77121229)

import * as http from "http";
import * as https from "https";
import * as fs from "fs";
Expand Down

0 comments on commit 8d021c1

Please sign in to comment.