mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
feat: npm init docusaurus, yarn create docusaurus (#5635)
* initial create-docusaurus impl * cleanup * @docusaurus/init renamed to create-docusaurus * 0.0.6 * update lockfile * fix lint * remove npm2yarn for "npm init" because npm2yarn doesn't convert it and yarn result fails to execute * prettier * add correct version * prettier * prettier * prettier * prettier * fix annoying --config .prettierrc issue
This commit is contained in:
parent
e1b4da04fe
commit
f6ec757aa0
102 changed files with 80 additions and 93 deletions
|
@ -27,7 +27,7 @@ function generateTemplateExample(template) {
|
|||
// /!\ we use the published init script on purpose,
|
||||
// because using the local init script is too early and could generate upcoming/unavailable config options
|
||||
// remember CodeSandbox templates will use the published version, not the repo version
|
||||
`npx @docusaurus/init@latest init examples/${template} ${command}`,
|
||||
`npm init docusaurus@latest examples/${template} ${command}`,
|
||||
// `node ./packages/docusaurus-init/bin/index.js init examples/${template} ${template}`,
|
||||
{
|
||||
stdio: 'inherit',
|
||||
|
@ -175,9 +175,9 @@ function run() {
|
|||
console.log('## Generate example folders...');
|
||||
console.log('');
|
||||
const excludes = ['README.md', 'shared'];
|
||||
const templates = readdirSync('./packages/docusaurus-init/templates').filter(
|
||||
(name) => !excludes.includes(name),
|
||||
);
|
||||
const templates = readdirSync(
|
||||
'./packages/create-docusaurus/templates',
|
||||
).filter((name) => !excludes.includes(name));
|
||||
console.log(`Will generate examples for templates: ${templates}`);
|
||||
templates.forEach(generateTemplateExample);
|
||||
console.log('Commiting changes');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue