react-native-css-modules icon indicating copy to clipboard operation
react-native-css-modules copied to clipboard

Generate/update typings on save

Open c-harding opened this issue 5 years ago • 5 comments

As the title says, would it be possible to update the typings of an scss file on save, in Visual Studio Code?

c-harding avatar Jul 10 '19 00:07 c-harding

To achieve this, I think that you could use a VSCode plugin (e.g. https://marketplace.visualstudio.com/items?itemName=emeraldwalk.RunOnSave) and run typed-css-modules for your project: https://www.npmjs.com/package/typed-css-modules#cli

kristerkari avatar Jul 10 '19 07:07 kristerkari

Looks like the "run on save" might be also possible without a plugin in VSCode: https://code.visualstudio.com/docs/editor/tasks#_binding-keyboard-shortcuts-to-tasks

kristerkari avatar Jul 10 '19 07:07 kristerkari

Nice! Are there equivalents for sass, as well as css? At least from the readme it only mentions CSS.

c-harding avatar Jul 10 '19 09:07 c-harding

it should work for both scss and css at least.

kristerkari avatar Jul 10 '19 10:07 kristerkari

I found https://www.npmjs.com/package/typed-scss-modules for SCSS 😃

c-harding avatar Jul 10 '19 19:07 c-harding