A toy CSS preprocessor implementation with SASS like grammar.
CLI
npm i sssa -g
# examples
sssa --help
cat file.sssa | sssa
echo '.a { .b { color: red; } }' | sssa
NodeJS
import { compile } from 'sssa';
const {
tokens,
ast,
code,
} = compile('b {}', opts);
opts.scan
Only proceed tokenize and return tokens;opts.parse
Proceed tokenize and generate corresponding ast;opts.transform
Transform SSSA ast to CSS ast;
# 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