css-transpiler
raw JSON → 1.0.16 verified Fri May 01 auth: no javascript
A lightweight CLI tool that transpiles .scss files to .css in-place within the src directory. Version 1.0.16 is the latest stable release. It runs as a daemon watching for changes and automatically regenerates CSS. Unlike full-featured build tools like Webpack or Gulp, it operates as a simple CLI command with no JavaScript API or plugin system. Best used as a development dependency for straightforward SCSS compilation without build pipeline integration.
Common errors
error -bash: transpile: command not found ↓
cause The package is not installed or not in PATH.
fix
Run 'npm install css-transpiler --save-dev' and use 'npx transpile' instead of bare 'transpile'.
error Error: src folder not found. Please create a src folder in your project root. ↓
cause The package requires a 'src' directory at project root.
fix
Create a src/ directory in your project root and move .scss files there.
Warnings
gotcha The package expects a 'src' directory at the project root. Files outside src/ are ignored. ↓
fix Ensure all .scss files are inside a src/ folder (or create it).
gotcha The transpiler overwrites .css files without warning. If you have custom .css edits, they will be lost. ↓
fix Keep custom .css files in a separate directory outside src/.
Install
npm install css-transpiler yarn add css-transpiler pnpm add css-transpiler Imports
- transpile wrong
require('css-transpiler')correctnpx transpile
Quickstart
mkdir -p src/components && echo '$color: red; h1 { color: $color; }' > src/components/app.scss && npm install css-transpiler --save-dev && npx transpile