Skip to content

Commit

Permalink
Switches files-pipeline component with files-pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Feb 26, 2023
1 parent 7a379b4 commit 0c309cb
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/options/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CRITTERS } from "./critters.js";
import type { Options as OptionsBase } from "files-pipeline/dist/options/index.js";
import type { Options as OptionsBase } from "files-pipe/dist/options/index.js";
export interface Options extends OptionsBase {
[key: string]: any;
critters?: boolean | CRITTERS;
Expand Down
2 changes: 1 addition & 1 deletion dist/options/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"dependencies": {
"critters": "0.0.16",
"files-pipeline": "0.0.4"
"files-pipe": "0.0.1"
},
"devDependencies": {
"@lightrix/config": "0.0.7",
"@lightrix/scripts": "0.1.3",
"@lightrix/scripts": "0.1.4",
"astro": "2.0.15"
},
"publishConfig": {
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type {
executions,
optionPath,
} from "files-pipeline/dist/options/index.js";
} from "files-pipe/dist/options/index.js";

// @ts-ignore
import Critters from "critters";

import defaults from "./options/index.js";

import { files } from "files-pipeline";
import deepmerge from "files-pipeline/dist/lib/deepmerge.js";
import { files } from "files-pipe";
import deepmerge from "files-pipe/dist/lib/deepmerge.js";

import { fileURLToPath } from "url";

import applyTo from "files-pipeline/dist/lib/apply-to.js";
import applyTo from "files-pipe/dist/lib/apply-to.js";

import type { AstroIntegration } from "astro";

Expand Down Expand Up @@ -90,8 +90,8 @@ export default (options: Options = {}): AstroIntegration => {
await new files(options["logger"]).in(path)
).by("**/*.html")
).not(options["exclude"])
).pipeline(
deepmerge(defaults["pipeline"], {
).pipe(
deepmerge(defaults["pipe"], {
wrote: async (ongoing) =>
critters.process(ongoing.buffer.toString()),
} satisfies executions)
Expand Down
8 changes: 4 additions & 4 deletions src/options/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import deepmerge from "files-pipeline/dist/lib/deepmerge.js";
import defaults from "files-pipeline/dist/options/index.js";
import deepmerge from "files-pipe/dist/lib/deepmerge.js";
import defaults from "files-pipe/dist/options/index.js";

import defaultsCRITTERS from "./critters.js";

import type { CRITTERS } from "./critters.js";

import type { Options as OptionsBase } from "files-pipeline/dist/options/index.js";
import type { Options as OptionsBase } from "files-pipe/dist/options/index.js";

export interface Options extends OptionsBase {
// rome-ignore lint/suspicious/noExplicitAny:
Expand All @@ -16,7 +16,7 @@ export interface Options extends OptionsBase {

export default deepmerge(defaults, {
critters: defaultsCRITTERS,
pipeline: {
pipe: {
failed: async (ongoing) =>
`Error: Cannot inline file ${ongoing.inputPath}!`,
fulfilled: async (plan) =>
Expand Down

0 comments on commit 0c309cb

Please sign in to comment.