diff --git a/src/run.ts b/src/run.ts index 8ac660f..4c7515f 100644 --- a/src/run.ts +++ b/src/run.ts @@ -7,6 +7,7 @@ import { DtsCreator } from './dts-creator'; import { DtsContent } from './dts-content'; const glob = util.promisify(_glob); +const cssExtRegex = /\.css$/i; interface RunOptions { pattern?: string; @@ -31,6 +32,9 @@ export async function run(searchDir: string, options: RunOptions = {}): Promise< }); const writeFile = async (f: string): Promise => { + if (!cssExtRegex.test(f)) { + return; + } try { const content: DtsContent = await creator.create(f, undefined, !!options.watch); await content.writeFile();