Skip to content

Commit c8ef3f3

Browse files
committed
fix: fixed watcher for blog
1 parent adf3991 commit c8ef3f3

File tree

5 files changed

+171
-113
lines changed

5 files changed

+171
-113
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,28 @@
5151
"dependencies": {
5252
"@micro-app/cli": "^0.3.17",
5353
"@vssue/api-github-v4": "^1.4.0",
54-
"@vssue/vuepress-plugin-vssue": "^1.4.3",
55-
"@vuepress/plugin-back-to-top": "^1.4.1",
54+
"@vssue/vuepress-plugin-vssue": "^1.4.4",
55+
"@vuepress/plugin-back-to-top": "^1.5.0",
5656
"@vuepress/plugin-blog": "^1.9.2",
57-
"@vuepress/plugin-google-analytics": "^1.4.1",
58-
"@vuepress/plugin-medium-zoom": "^1.4.1",
59-
"@vuepress/plugin-pwa": "^1.4.1",
57+
"@vuepress/plugin-google-analytics": "^1.5.0",
58+
"@vuepress/plugin-medium-zoom": "^1.5.0",
59+
"@vuepress/plugin-pwa": "^1.5.0",
6060
"clipboard": "^2.0.6",
61-
"generate-robotstxt": "^8.0.2",
61+
"generate-robotstxt": "^8.0.3",
6262
"markdown-it-footnote": "^3.0.2",
6363
"markdown-it-imsize": "^2.0.1",
6464
"markdown-it-mark": "^3.0.0",
6565
"markdown-it-sub": "^1.0.0",
6666
"markdown-it-sup": "^1.0.0",
6767
"markdown-it-task-lists": "^2.1.1",
68-
"moment": "^2.24.0",
68+
"moment": "^2.25.3",
6969
"remove-markdown": "^0.3.0",
7070
"rss": "^1.2.2",
7171
"scrollreveal": "^4.0.6",
72-
"svg-sprite-loader": "^4.2.7",
72+
"svg-sprite-loader": "^4.3.0",
7373
"svgo": "^1.3.2",
7474
"svgo-loader": "^2.2.1",
75-
"vuepress": "^1.4.1",
75+
"vuepress": "^1.5.0",
7676
"vuepress-plugin-flowchart": "^1.4.3",
7777
"vuepress-plugin-redirect": "^1.2.3"
7878
}

src/commands/createConfig.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ module.exports = function createConfig(api, args, opts) {
5353
require('../constants').FILENAMES.map(filename => path.resolve(api.root, filename))
5454
);
5555

56+
// blog
57+
const blogConfig = config.themeConfig && config.themeConfig.blogConfig || {};
58+
const postsDir = blogConfig.postsDir || 'posts';
59+
config.extraWatchFiles.push(postsDir); // add watcher files
60+
5661
api.logger.debug('vuepressConfig: ', JSON.stringify(config, false, 4));
5762
return config;
5863
};

src/constants/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ module.exports = {
88
'micro-app.config.js',
99
'micro-app.extra.config.js',
1010
`micro-app.${NAME}.config.js`,
11+
'microapp/config.js',
12+
'microapp/extra.config.js',
13+
`microapp/${NAME}.config.js`,
14+
'microapp/config/index.js',
15+
'microapp/config/extra.js',
16+
`microapp/config/${NAME}.js`,
1117
],
1218
};

src/extends/extends.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ module.exports = (api, opts) => {
3737
];
3838
const orgkeys2 = [
3939
'markdown', 'plugins',
40+
'extraWatchFiles',
4041
];
4142
const commonConfig = _.pick(selfVuepressConfig, [].concat(orgkeys).concat(orgkeys2));
4243
const sourceDir = commonConfig.sourceDir || '.';

0 commit comments

Comments
 (0)