0.12.1 • Published 1 year ago
glass-easel-stylesheet-compiler v0.12.1
glass-easel-stylesheet-compiler
The stylesheet compiler for the glass-easel project.
This tool can help:
- convert
rpxtovw; - work with style isolation options through class-prefixes;
- minify the output CSS.
Refer to the glass-easel project for further details.
Build
rust toolchain and wasm-pack should be globally installed.
Build WebAssembly binary:
wasm-pack build glass-easel-stylesheet-compiler --target nodejs --out-dir pkg-nodejsBuild binary:
cargo build --releaseJavaScript Interface
This tool can be used in webpack, i.e. glass-easel-miniprogram-webpack-plugin .
However, if you want to call it directly, see the example below.
const { StyleSheetTransformer } = require('glass-easel-stylesheet-compiler')
// convert a CSS file
const rpxRatio = 750
const sst = new StyleSheetTransformer(PATH, CONTENT, CLASS_PREFIX, rpxRatio)
// get the CSS output
const ss = sst.getContent()
// get the source map if needed
sst.toSourceMap()
// free it if the source map is not required
sst.free()0.11.0
1 year ago
0.12.1
1 year ago
0.10.1
2 years ago
0.10.2
1 year ago
0.10.3
1 year ago
0.10.0
2 years ago
0.9.0
2 years ago
0.8.1
2 years ago
0.5.4
2 years ago
0.8.0
2 years ago
0.8.2
2 years ago
0.7.0
2 years ago
0.6.1
2 years ago
0.6.0
2 years ago
0.5.3
2 years ago
0.5.2
2 years ago
0.5.0
2 years ago
0.5.1
2 years ago
0.4.0
2 years ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.1
3 years ago
0.2.0
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago