Skip to content

Instantly share code, notes, and snippets.

@derekbtw
Last active December 24, 2017 20:18
Show Gist options
  • Save derekbtw/9fad6c11da176f4fd12afc3b344edd6f to your computer and use it in GitHub Desktop.
Save derekbtw/9fad6c11da176f4fd12afc3b344edd6f to your computer and use it in GitHub Desktop.
Paste file into any folder to create Docusaurus app (Windows)
Checks to make sure you have Docusaurus installed, then if it finds it - initializes a new app for you in the current directory.
Then just run: $ yarn run start ((or)) $ npm run start
https://docusaurus.io/
https://github.com/facebook/Docusaurus
@ECHO OFF
TITLE Create Docusaurus App
ECHO Initializing Docusaurus project...
@IF EXIST "%APPDATA%\npm\node_modules\docusaurus-init\initialize.js" (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%APPDATA%\npm\node_modules\docusaurus-init\initialize.js" %*
) ELSE (
ECHO.
ECHO Cannot find Docusaurus-Init installation. Please run one of the following commands:
ECHO.
ECHO $ yarn global add docusaurus-init
ECHO.
ECHO - OR -
ECHO.
ECHO $ npm install -g docusaurus-init
ECHO.
ECHO and then run this application again.
ECHO.
ECHO Press ^[ENTER^] to exit...
set /p input=
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment