浏览代码

export Source Sink Flow

Aurélien Richez 4 年之前
父节点
当前提交
d9a8f8dc79
共有 5 个文件被更改,包括 11 次插入4 次删除
  1. 6 2
      package.json
  2. 1 1
      src/Flow.ts
  3. 1 1
      src/Sink.ts
  4. 3 0
      src/index.ts
  5. 0 0
      src/internal/common.ts

+ 6 - 2
package.json

@@ -3,11 +3,15 @@
   "version": "1.0.0",
   "version": "1.0.0",
   "description": "",
   "description": "",
   "lib": "index/index.js",
   "lib": "index/index.js",
-  "files": ["lib/*"],
+  "files": [
+    "lib/*"
+  ],
   "scripts": {
   "scripts": {
     "test": "mocha -r ts-node/register test/*.test.ts",
     "test": "mocha -r ts-node/register test/*.test.ts",
     "test:watch": "mocha -r ts-node/register --watch --watch-files src/**/*.ts --reporter Min  test/*.test.ts",
     "test:watch": "mocha -r ts-node/register --watch --watch-files src/**/*.ts --reporter Min  test/*.test.ts",
-    "build": "npm run clean && tsc && tsc -p tsconfig.json",
+    "prebuild": "npm run clean",
+    "build": "tsc -p tsconfig.json",
+    "build:watch": "tsc -p tsconfig.json --watch",
     "clean": "rimraf lib"
     "clean": "rimraf lib"
   },
   },
   "author": "",
   "author": "",

+ 1 - 1
src/Flow.ts

@@ -8,7 +8,7 @@ import {
   FilteredStreamBuilder,
   FilteredStreamBuilder,
 } from './internal/StreamStageBuilder'
 } from './internal/StreamStageBuilder'
 
 
-import { Phantom } from './common'
+import { Phantom } from './internal/common'
 import type { Sink } from './Sink'
 import type { Sink } from './Sink'
 
 
 export class Flow<Input, Output> {
 export class Flow<Input, Output> {

+ 1 - 1
src/Sink.ts

@@ -1,6 +1,6 @@
 import * as stream from 'stream'
 import * as stream from 'stream'
 
 
-import { Phantom } from './common'
+import { Phantom } from './internal/common'
 
 
 export const Done = Symbol('Done')
 export const Done = Symbol('Done')
 export type Done = typeof Done
 export type Done = typeof Done

+ 3 - 0
src/index.ts

@@ -0,0 +1,3 @@
+export { Source } from './Source'
+export { Sink } from './Sink'
+export { Flow } from './Flow'

+ 0 - 0
src/common.ts → src/internal/common.ts