parcel-transformer-ts-css-modules

1.0.14 • Public • Published

parcel-transformer-ts-css-modules

Bridge ts with your css-modules

This transformer is going to create .d.ts according to your .module.css files using typed-css-modules , so that you can reference your css in ts files without type errors.

Installation

npm i -D parcel-transformer-ts-css-modules
or
yarn add -D parcel-transformer-ts-css-modules

At the root of your project, next to your package.json, add a .parcelrc file and paste the following code:

{
  "extends": "@parcel/config-default",
  "transformers": {
    "*.module.css": [
      "parcel-transformer-ts-css-modules",
      "..."
    ]
  }
}

Configuration

If you want to configure underlying ts-css-modules library, create ./tcm.config.json file and configure it as it is described in here.
For instance like this:

{
  "camelCase": true
}

Example

What it does in practice you can see in this example here.

Contribution

This library is open source and depends on your input. Feel free to suggest improvements and/or contribute!

Package Sidebar

Install

npm i parcel-transformer-ts-css-modules

Weekly Downloads

503

Version

1.0.14

License

ISC

Unpacked Size

4 kB

Total Files

4

Last publish

Collaborators

  • dmitrijs-balcers