Skip to content

Commit

Permalink
feat($core): config pattern of resolved files (#1705)
Browse files Browse the repository at this point in the history
* feat($core): config pattern of resolved files

Thank's for your work @eduardcotmrf  good job

fix #1700
  • Loading branch information
eduardcotmrf authored and fgiraud committed Oct 8, 2019
1 parent c2ed43d commit 1f3e4e2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/@vuepress/core/lib/node/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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' }]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hello, VuePress!
7 changes: 7 additions & 0 deletions packages/docs/docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions packages/docs/docs/zh/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1f3e4e2

Please sign in to comment.