@tsmodule/react
TypeScript icon, indicating that this package has built-in type declarations

12.0.0 • Public • Published

tsmodule component library

This is a tsmodule component library developed and previewed with Next.js.

Develop

To start the Next server and develop your components, use next dev or the yarn dev script:

yarn dev
# calls `next dev`

Export and publish

To export your component library, use tsmodule build or the yarn export script:

yarn export
# calls `tsmodule build`

You can then publish to NPM:

yarn publish

Importing from your component library

To reuse your components:

  1. Import your component styles via import "my-library/styles".
  2. Import your component and render it via import { MyComponent } from "my-library/MyComponent.

Footnotes

Styles are exported in dist/, and are also bundled to dist/bundle.css from the entrypoint given in the style package.json.

The default behavior is to export all component styles, i.e. src/styles/components/index.css ➞ dist/bundle.css. This can be overridden with tsmodule's --styles flag, i.e. tsmodule build --styles src/styles/index.css (which would include all styles in emitted bundle).

Readme

Keywords

none

Package Sidebar

Install

npm i @tsmodule/react

Weekly Downloads

1

Version

12.0.0

License

MIT

Unpacked Size

137 kB

Total Files

45

Last publish

Collaborators

  • ctjlewis