Skip to content

Commit cd249cb

Browse files
committed
Use the types.ts from core
1 parent 06b436b commit cd249cb

File tree

4 files changed

+12
-34
lines changed

4 files changed

+12
-34
lines changed

lib/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ function buildProcessFile(copyConfig, options) {
6161
/**
6262
* @import {
6363
* Config,
64+
* ProcessFile
65+
* } from "./types.ts"
66+
*
67+
* @import {
6468
* FaucetPlugin,
6569
* FaucetPluginOptions,
6670
* WriteFileOpts,
67-
* ProcessFile
68-
* } from "./types.ts"
71+
* } from "faucet-pipeline-core/lib/types.ts"
6972
*/

lib/types.ts

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
1-
// faucet-pipeline-core types
2-
export interface FaucetPlugin<T> {
3-
(config: T[], assetManager: AssetManager, options: FaucetPluginOptions): FaucetPluginFunc
4-
}
5-
6-
export interface FaucetPluginFunc {
7-
(filepaths: string[]): Promise<unknown>
8-
}
9-
10-
export interface FaucetPluginOptions {
11-
browsers?: string[],
12-
sourcemaps?: boolean,
13-
compact?: boolean
14-
}
15-
16-
export interface AssetManager {
17-
resolvePath: (path: string, opts?: ResolvePathOpts) => string
18-
writeFile: (targetPath: string, content: Buffer, options: WriteFileOpts) => Promise<unknown>
19-
}
20-
21-
export interface ResolvePathOpts {
22-
enforceRelative?: boolean
23-
}
24-
25-
export interface WriteFileOpts {
26-
targetDir: string,
27-
fingerprint?: boolean
28-
}
1+
import { AssetManager } from "faucet-pipeline-core/lib/types.ts"
292

30-
// faucet-pipeline-static types
313
export interface Config {
324
source: string,
335
target: string,

lib/util.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,13 @@ async function tree(filepath, referenceDir = filepath) {
111111

112112
/**
113113
* @import {
114-
* AssetManager,
115-
* FaucetPluginFunc,
116114
* Filter,
117115
* FileFinderOptions,
118116
* ProcessFile
119117
* } from "./types.ts"
118+
*
119+
* @import {
120+
* AssetManager,
121+
* FaucetPluginFunc,
122+
* } from "faucet-pipeline-core/lib/types.ts"
120123
*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"node": ">= 20.19.0"
2525
},
2626
"dependencies": {
27-
"faucet-pipeline-core": "^2.0.0 || ^3.0.0"
27+
"faucet-pipeline-core": "git+https://github.com/faucet-pipeline/faucet-pipeline-core.git#util-cleanup"
2828
},
2929
"devDependencies": {
3030
"@types/node": "^22.13.10",

0 commit comments

Comments
 (0)