feat($core): config pattern of resolved files (#1705)

* feat($core): config pattern of resolved files

Thank's for your work @eduardcotmrf  good job

fix #1700
This commit is contained in:
Eduard Cot
2019-10-08 20:03:20 +02:00
committed by fgiraud
parent c2ed43d2b4
commit 1f3e4e297b
5 changed files with 28 additions and 1 deletions
+3 -1
View File
@@ -316,7 +316,9 @@ module.exports = class App {
async resolvePages () {
// resolve pageFiles
const patterns = ['**/*.md', '**/*.vue', '!.vuepress', '!node_modules']
const patterns = this.siteConfig.patterns ? this.siteConfig.patterns : ['**/*.md', '**/*.vue']
patterns.push('!.vuepress', '!node_modules')
if (this.siteConfig.dest) {
// #654 exclude dest folder when dest dir was set in
// sourceDir but not in '.vuepress'
@@ -0,0 +1,10 @@
module.exports = {
title: 'Hello VuePress',
description: '# Hello, VuePress!',
dest: 'vuepress',
base: 'vuepress',
patterns: ['**/*.md', '**/*.vue', '!**/deploy.*'],
head: [
['link', { rel: 'icon', href: '/logo.png' }]
]
}
@@ -0,0 +1 @@
# Hello, VuePress!
+7
View File
@@ -131,6 +131,13 @@ module.exports = {
}
```
### patterns
- Type: `Array`
- Default: `['**/*.md', '**/*.vue']`
Specify which pattern of files you want to be resolved.
## Styling
### palette.styl
+7
View File
@@ -127,6 +127,13 @@ module.exports = {
}
```
### patterns
- Type: `Array`
- Default: `['**/*.md', '**/*.vue']`
Specify which pattern of files you want to be resolved.
## Styling
### palette.styl