1.0.7 • Published 2 months ago

scss-typer v1.0.7

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

SCSS-Typer

GitHub license npm version PRs Welcome CI status

A node script/package to automatically generate TypeScript type definitions for all your .module.scss files.

Usage

npx scss-typer /path/to/file/or/directory [-a|--all]

Just run the script using npx (or install it globally) and run it on a chosen file or directory. It will recursively go over all .module.scss files in the directory and create .d.ts type definitions for them.

If there already are type definitions it will only recreate them if the SCSS file was modified.

If you want to also recreate existing type definitions, run the command with the --all or -a flag.

You should configure your IDE to run the script on save for the best possible experience!

Benefits

Using type definitions for your .module.scss files will give you two main benefits:

  1. Your IDE can autocomplete your classNames.
  2. Your IDE will highlight every className that isn't defined in your .module.scss file as an error.

What if my colleagues don't like it?

If you don't want to force your colleagues to also use scss-typer, then you can just add the following rule to your .gitignore file:

*.module.scss.d.ts

This will ensure that none of the files generated by scss-typer will be tracked by git. Meaning that they will only remain on your computer.

Contributors

Niklas Ziermann

License

MIT License

1.0.7

2 months ago

1.0.6

6 months ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago