tsccss
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

tsccss npm npm

As we all know, Typescript compiler does not process .scss or .less files when compiling .ts files, we usually use node-sass or less to process them. But in our compiled .js files the style file suffixes are not changed, tsccss can help you change them all to .css suffixes without worrying about replacing them in other places you don't want to, this tool is based on AST, not Regular Expressions.

Getting Started

First, install tsccss as devDependency using npm or yarn.

npm install tsccss --save-dev
# or
yarn add tsccss -D

Add it to your build scripts in package.json

"scripts": {
  "build": "tsc -p tsconfig.json && tsccss -o ./out",
}

Options

flag description
-o --out output directory of transpiled code (tsc --outDir)

You need to provide -o (--out), this is the root folder where you need to do the style suffix replacement.

License

MIT

Package Sidebar

Install

npm i tsccss

Weekly Downloads

903

Version

1.0.0

License

MIT

Unpacked Size

15.1 kB

Total Files

15

Last publish

Collaborators

  • vortesnail