This repository was archived by the owner on Apr 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +48
-4
lines changed Expand file tree Collapse file tree 2 files changed +48
-4
lines changed Original file line number Diff line number Diff line change 1- # typescript-plugin-css-module-types
1+ [ ![ Build Status] ( https://travis-ci.com/GodLesZ/typescript-plugin-css-module-types.svg?branch=master )] ( https://travis-ci.com/GodLesZ/typescript-plugin-css-module-types )
2+ [ ![ codecov] ( https://codecov.io/gh/GodLesZ/typescript-plugin-css-module-types/branch/master/graph/badge.svg )] ( https://codecov.io/gh/GodLesZ/typescript-plugin-css-module-types )
23
3- Typescript plugin to get intellisense and validation for SCSS imports as [ CSS Modules] ( https://github.com/css-modules/css-modules ) .
4+ # TS Types for CSS Modules
5+
6+ This Typescript plugin hooks itself into the Typescript Language Service
7+ to provide intellisense and validation for SCSS imports as [ CSS Modules] ( https://github.com/css-modules/css-modules ) .
8+
9+ It supports ` .module.scss ` imports containing valid SCSS code.
10+
11+ ## Features
12+ The following SCSS (and CSS Modules) feature are supported:
13+
14+ ``` scss
15+ // :global and :local identifier and functions
16+ :global .global-class { }
17+ :global(.global-class ) { }
18+ :local .local-class { }
19+ :local(.local-class ) { }
20+
21+ // Variables
22+ $color : red ;
23+ .className {
24+ color : $color ;
25+ }
26+
27+ // Loops
28+ $color : red ;
29+ @for $section from 1 to 5 {
30+ .section-#{$section } {
31+ color : $color ;
32+ }
33+ }
34+ ```
35+
36+ Also ** imports** are supported.\
37+ As of now there's also a limited path-resolution support to allow ** module imports** .
38+
39+ ``` scss
40+ @import " ./relative/path/some/file" ;
41+
42+ @import " absolute/path/some/file" ;
43+ ```
444
545# Thanks
646
Original file line number Diff line number Diff line change 11{
22 "name" : " typescript-plugin-css-module-types" ,
3+ "description" : " CSS modules (based on scss) support for TypeScript" ,
34 "version" : " 0.1.0" ,
4- "main" : " build/index.js" ,
55 "author" : " GodLesZ <godlesz@hotmail.de>" ,
66 "license" : " MIT" ,
7- "description" : " CSS modules (based on scss) support for TypeScript" ,
7+ "bugs" : " https://github.com/GodLesZ/typescript-plugin-css-module-types/issues" ,
8+ "homepage" : " https://github.com/GodLesZ/typescript-plugin-css-module-types" ,
9+ "repository" : " https://github.com/GodLesZ/typescript-plugin-css-module-types" ,
810 "keywords" : [
911 " css" ,
1012 " scss" ,
1315 " plugin" ,
1416 " typescript"
1517 ],
18+ "main" : " build/index.js" ,
19+ "types" : " build/index.d.ts" ,
1620 "files" : [
1721 " build"
1822 ],
You can’t perform that action at this time.
0 commit comments