sssa
v0.4.1
Published
A toy CSS preprocessor implementation with SASS like grammar.
Downloads
20
Readme
SSSA
A toy CSS preprocessor implementation with SASS like grammar.
Usage
CLI
npm i sssa -g
# examples
sssa --help
cat file.sssa | sssa
echo '.a { .b { color: red; } }' | sssaNodeJS
import { compile } from 'sssa';
const {
tokens,
ast,
code,
} = compile('b {}', opts);Options
opts.scanOnly proceed tokenize and return tokens;opts.parseProceed tokenize and generate corresponding ast;opts.transformTransform SSSA ast to CSS ast;
Develop
# install deps
npm install
# build app
npm run build
# build & watch app
npm run watch
# build & launch app
npm run start
# run unit test
npm run test