Skip to content

Commit

Permalink
feat: Use regex to filter .vue files
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed May 25, 2018
1 parent 96a7d18 commit 1c77e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export interface VuePluginOptions {
* Include files or directories.
* @default `'.vue'`
*/
include?: string
include?: Array<string|RegExp> | string | RegExp
/**
* Exclude files or directories.
* @default `undefined`
*/
exclude?: string
exclude?: Array<string|RegExp> | string | RegExp
/**
* Default language for blocks.
*
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export interface VuePartRequestCreator {
}

export function createVueFilter(
include: string | string[] = ['*.vue', '**/*.vue'],
exclude: string | string[] = []
include: Array<string|RegExp> | string | RegExp = [/\.vue$/i],
exclude: Array<string|RegExp> | string | RegExp = []
): (file: string) => boolean {
const filter = createFilter(include, exclude)

Expand Down

0 comments on commit 1c77e2a

Please sign in to comment.