0.0.13 • Published 3 years ago

@juliani/sass2ts v0.0.13

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

@juliani/sass2ts

This package converts a sass variables file into 3 files:

  • variables.json
  • varaibles.interfaces.ts
  • varaibles.proxies.ts

Typescript files generated with make-types (only dependancy)

Install

npm i -D @juliani/sass2ts maketypes
yarn add -D @juliani/sass2ts maketypes

Usage

sass2ts input.scss output.json

params

  • inputSass
  • outputJson - typescript files will also be placed in this location

It ignores any lines that don't contain variables including maps. If using maps ensure they are backed with variables to ensure all values are exported.

{variables}.json

A JSON representation of all variables - can be imported directly in Typescript as JSON Module

{variables}.interfaces.ts + varaibles.proxies.ts

Both of these files can be used to type-check the JSON output, interfaces has no run-time guarantees but proxies is heavier. See here for a full explanation and usage examples.

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago