A simple SCSS-to-CSS compiler written in TypeScript from scratch, designed for educational purposes to demonstrate compiler construction (lexing, parsing, AST, IR, code generation). Current version 0.12.2 runs in Node.js (>=10.x) and browsers via ESM bundle. It supports variables, nesting, extend/inheritance, operators, mixins, and modules (@import and @use). Not production-ready; focuses on simplicity and zero dependencies. The package ships TypeScript types. Ideal for learning compiler internals.
npm install tiny-sass-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates Node.js renderSync and browser compile API usage.
Ensure built CSS includes @media rules expected by your styles.
Use mature compilers like Dart Sass or LibSass for production.
Use directories: `tiny-sass src/ dist/`.
Import from 'tiny-sass-compiler/dist/tiny-sass-compiler.esm-browser.prod.js' in browser environments.
Run `npm install --save tiny-sass-compiler` in your project root.
Use `import sass from 'tiny-sass-compiler'` then `sass.render(...)`.
Ensure the .scss file exists at the given path, or use absolute path.
No dependency data recorded yet.