Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typed-css-modules

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typed-css-modules

Creates .d.ts files from css-modules' .css files

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
81K
increased by24.97%
Maintainers
1
Weekly downloads
 
Created
Source

typed-css-modules

Creates TypeScript definiton files from css-modules .css files.

If you have the following css,

.myClass {
  color: red;
}

this creates the following .d.ts files from it:

export const myClass: string;

So, you can use CSS modules in your .ts sources:

import * as styles from './styles.css';
console.log(`<div class="${styles.myClass}"></div>`);

usage

CLI

npm install -g typed-css-modules
tcm -d src

Then, this creates *.css.d.ts file under the directory which has original .css file.

(your project root)
- src/
    | myStyle.css
    | myStyle.css.d.ts [created]
watch

With -w or --watch, this CLI watches files in the input directory.

API

T.B.D.

License

This software is released under the MIT License, see LICENSE.txt.

Keywords

FAQs

Package last updated on 26 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc