sssa
v0.4.1
Published
A toy CSS preprocessor implementation with SASS like grammar.
Downloads
12
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; } }' | sssa
NodeJS
import { compile } from 'sssa';
const {
tokens,
ast,
code,
} = compile('b {}', opts);
Options
opts.scan
Only proceed tokenize and return tokens;opts.parse
Proceed tokenize and generate corresponding ast;opts.transform
Transform 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