feat: add exclude option

pull/281/head
hanlee 5 years ago
parent a43933c8ab
commit 02eee1a8ea

@ -23,6 +23,7 @@ export interface UserConfig<ThemeConfig = any> {
markdown?: MarkdownOptions markdown?: MarkdownOptions
customData?: any customData?: any
vueOptions?: VuePluginOptions vueOptions?: VuePluginOptions
exclude?: string[]
} }
export interface SiteConfig<ThemeConfig = any> { export interface SiteConfig<ThemeConfig = any> {
@ -57,7 +58,7 @@ export async function resolveConfig(
root, root,
site, site,
themeDir, themeDir,
pages: await globby(['**.md'], { cwd: root, ignore: ['node_modules'] }), pages: await globby(['**.md'], { cwd: root, ignore: ['**/node_modules', ...userConfig.exclude || [] ] }),
configPath: resolve(root, 'config.js'), configPath: resolve(root, 'config.js'),
outDir: resolve(root, 'dist'), outDir: resolve(root, 'dist'),
tempDir: path.resolve(APP_PATH, 'temp'), tempDir: path.resolve(APP_PATH, 'temp'),

Loading…
Cancel
Save