mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
refactor: use alias for docs & eslint
This commit is contained in:
parent
8538a10a66
commit
d36c17f368
3 changed files with 20 additions and 9 deletions
|
@ -4,7 +4,15 @@ const path = require('path');
|
|||
const mdLoader = require.resolve('./loader/markdown');
|
||||
|
||||
module.exports = function createBaseConfig(props) {
|
||||
const {siteConfig, outDir, themePath, siteDir, baseUrl} = props;
|
||||
const {
|
||||
siteConfig,
|
||||
outDir,
|
||||
themePath,
|
||||
docsDir,
|
||||
pagesDir,
|
||||
siteDir,
|
||||
baseUrl
|
||||
} = props;
|
||||
|
||||
const config = new Config();
|
||||
const isProd = process.env.NODE_ENV === 'production';
|
||||
|
@ -23,7 +31,8 @@ module.exports = function createBaseConfig(props) {
|
|||
.set('symlinks', true)
|
||||
.alias.set('@theme', themePath)
|
||||
.set('@site', siteDir)
|
||||
.set('@pages', path.resolve(siteDir, 'pages'))
|
||||
.set('@docs', docsDir)
|
||||
.set('@pages', pagesDir)
|
||||
.set('@generated', path.resolve(__dirname, '../core/generated'))
|
||||
.set('@core', path.resolve(__dirname, '../core'))
|
||||
.end();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue