Permalink
Browse files

feat: Use regex to filter .vue files

  • Loading branch information...
znck committed May 25, 2018
1 parent 96a7d18 commit 1c77e2ac0ad29bd82cdaa504ceed8b0195cbde1b
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/index.ts
  2. +2 −2 src/utils.ts
@@ -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.
*
@@ -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)

0 comments on commit 1c77e2a

Please sign in to comment.