Skip to content

Commit b535bee

Browse files
committed
fix bug with ignore files and specified imports
1 parent adb8dd5 commit b535bee

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

deno.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"test": "deno test --fail-fast --allow-read --allow-write",
88
"format": "deno lint && deno fmt"
99
},
10-
"imports": {},
10+
"imports": {
11+
"@std/fs": "jsr:@std/fs@^1.0.5",
12+
"@std/path": "jsr:@std/path@^1.0.7"
13+
},
1114
"fmt": {
1215
"indentWidth": 4,
1316
"singleQuote": true

deno.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/steve.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* 11/18/2024
99
*/
1010

11-
import { walkSync } from 'jsr:@std/fs@1.0.5';
12-
import { relative } from 'jsr:@std/path@1.0.7';
11+
import { walkSync } from '@std/fs';
12+
import { relative } from '@std/path';
1313
import type STEVEPlugin from './plugin.ts';
1414

1515
/**

src/plugin/site-generator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* 11/18/2024
99
*/
1010

11-
import { copySync, existsSync, walkSync } from 'jsr:@std/fs@1.0.5';
12-
import { join, resolve } from 'jsr:@std/path@1.0.7';
11+
import { copySync, existsSync, walkSync } from '@std/fs';
12+
import { join, resolve } from '@std/path';
1313
import { STEVE, STEVEPlugin } from '../../index.ts';
1414

1515
/**
@@ -160,7 +160,7 @@ class SiteGenerator extends STEVEPlugin {
160160
if (existsSync(this.#outputDirectory)) {
161161
for (const file of walkSync(this.#outputDirectory)) {
162162
if (
163-
this.#ignoredFiles?.includes(file.name) ||
163+
this.#ignoredFiles?.filter(filename => resolve(file.path).includes(filename)).length > 0 ||
164164
file.name.startsWith('.') ||
165165
resolve(this.#outputDirectory) === file.path
166166
) continue;

0 commit comments

Comments
 (0)