Tool for creating types for css modules with typescript typing and emeth.
Run it as a background process
$ yarn run tse -w ./src/**/*.cssm
or in a single shot
$ yarn run tse ./src/**/*.cssm
$ yarn run tse -h
Add ts-emeth as a mrbuilder plugin before the @mrbuilder/plugin-css
. Order
unfortunately matters.
"mrbuilder": {
"plugins": [
"ts-emeth",
[
"@mrbuilder/plugin-css",
{
"modules": "/\\.cssm$/"
}
]
]
}
Add the ts-emeth as a plugin for postcss.
postcss.plugins([...,require('ts-emeth')()]).process('css');