@nx/remix:library

Generate a Remix library to help structure workspace and application.

Usage

1nx generate library ... 2
1nx g lib ... #same 2

By default, Nx will search for library in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

1nx g @nx/remix:library ... 2

Show what will be generated without writing to disk:

1nx g library ... --dry-run 2

Examples

Generate libs/myapp/mylib:

1g lib mylib --directory=myapp 2

Options

name

Required
string
Pattern: ^[a-zA-Z].*$

Library name

directory

dir
string

A directory where the lib is placed.

buildable

boolean
Default: false

Should the library be buildable?

importPath

string

The library name used to import it, like @myorg/my-awesome-lib

js

boolean
Default: false

Generate JavaScript files rather than TypeScript files

projectNameAndRootFormat

string
Accepted values: as-provided, derived

Whether to generate the project name and root directory as provided (as-provided) or generate them composing their values and taking the configured layout into account (derived).

style

string
Default: css
Accepted values: none, css

Generate a stylesheet

tags

string

Add tags to the library (used for linting)

unitTestRunner

string
Default: vitest
Accepted values: vitest, jest, none

Test Runner to use for Unit Tests

skipFormat

Internal
boolean
Default: false

Skip formatting files after generator runs