3.1.0 • Published 10 months ago

@nx-extend/docusaurus v3.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@nx-extend/docusaurus

Nx plugin for working with docusaurus.

This was originally build by nx-plus

Contents

Getting Started

Install Plugin

# npm
npm install @nx-extend/docusaurus --save-dev

# yarn
yarn add @nx-extend/docusaurus --dev

Generate Your App

nx g @nx-extend/docusaurus:app my-app

Serve Your App

nx serve my-app

Schematics (i.e. code generation)

Application

nx g @nx-extend/docusaurus:app <name> [options]

ArgumentsDescription
<name>The name of your app.
OptionsDefaultDescription
--tags-Tags to use for linting (comma-delimited).
--directoryappsA directory where the project is placed.
--skipFormatfalseSkip formatting files.

Builders (i.e. task runners)

Dev Server

nx serve <name> [options]

ArgumentsDescription
<name>The name of your app.
OptionsDefaultDescription
--port3000Use specified port.
--hostlocalhostUse specified host.
--hotOnlyfalseDo not fallback to page refresh if hot reload fails.
--openfalseOpen page in the browser.

Browser

nx build <name> [options]

ArgumentsDescription
<name>The name of your app.
OptionsDefaultDescription
--bundleAnalyzerfalseVisualize size of webpack output files with an interactive zoomable treemap.
--outputPath-The full path for the new output directory, relative to the current workspace.
--minifytrueBuild website minimizing JS bundles.

Troubleshooting

If you encounter this error while building a Docusaurus app, then you may need to add a terser resolution to your package.json. Note: this only works with Yarn and not npm.

Error:

Docusaurus user: you probably have this known error due to using a monorepo/workspace.
We have a workaround for you, check https://github.com/facebook/docusaurus/issues/3515

package.json:

{
  // ...
  "resolutions": {
    "terser": "^4.0.0"
  }
  // ...
}

Once this has been updated, you should be able to run yarn install and then build your Docusaurus application.

3.1.0

10 months ago

2.0.3

10 months ago

2.0.4

10 months ago

3.0.0

10 months ago

2.0.2

11 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago