mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
v2: prepare to move
This commit is contained in:
parent
dc7ef96849
commit
45736200b0
172 changed files with 0 additions and 0 deletions
16
v2/lib/commands/eject.js
Normal file
16
v2/lib/commands/eject.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
const fs = require('fs-extra');
|
||||
const chalk = require('chalk');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = async function eject(siteDir) {
|
||||
const defaultTheme = path.resolve(__dirname, '..', 'theme');
|
||||
const customTheme = path.resolve(siteDir, 'theme');
|
||||
await fs.copy(defaultTheme, customTheme);
|
||||
|
||||
const relativeDir = path.relative(process.cwd(), customTheme);
|
||||
console.log(
|
||||
`\n${chalk.green('Success!')} Copied default theme files to ${chalk.cyan(
|
||||
relativeDir
|
||||
)}.\n`
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue