0.1.16 • Published 5 years ago

@krobkrong/resources-utilities v0.1.16

Weekly downloads
10
License
Apache-2.0
Repository
github
Last release
5 years ago

npm npm test coverage node-sass webpack Codacy Badge

resources-utilities

A command line and library to generate typescript definition file from CSS, SASS, SCSS or SVG file.

Install

Using NPM

npm i -D @krobkrong/resources-utilities

Using Yarn

yarn add @krobkrong/resources-utilities -D

Command Line Usage

Resource utilities provide a command line that accept the last argument with glob pattern input syntax. For example, the command line below will generate a typescript definition file from a CSS file in the current work directory:

resutil theme*.css

If you've a specific location to store typescript definition file then you can use output directory option:

resutil -o types theme*.css

The command above will generate the typescript definition file in the folder types in the current working directory.

For more information run resutil --help

APIs Usage

Resource utilities provided APIs for both CSS and SVG. The below code utilize StyleUtils namespace to parse raw css file:

import { StyleUtils } from "@krobkrong/resources-utilities";

let resource = StyleUtils.parse(raw, {
   convension: "camel",
   cssClass: true,
   cssId: true,
   cssVariable: true
})
0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago