mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 10:52:35 +02:00
feat(v2): allow init project via npm (#3729)
* feat(v2: allow init project via npm * Add test-website to workspace * Remove test-website from workspace * Refactor
This commit is contained in:
parent
d05d703dad
commit
5f20200661
3 changed files with 14 additions and 5 deletions
|
@ -38,9 +38,10 @@ program
|
|||
|
||||
program
|
||||
.command('init [siteName] [template] [rootDir]')
|
||||
.option('--use-npm')
|
||||
.description('Initialize website')
|
||||
.action((siteName, template, rootDir = '.') => {
|
||||
wrapCommand(init)(path.resolve(rootDir), siteName, template);
|
||||
.action((siteName, template, rootDir = '.', {useNpm}) => {
|
||||
wrapCommand(init)(path.resolve(rootDir), siteName, template, {useNpm});
|
||||
});
|
||||
|
||||
program.arguments('<command>').action((cmd) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue