scss-parser:用于解析SCSS的库

时间:2021-05-02 13:40:07
【文件属性】:
文件名称:scss-parser:用于解析SCSS的库
文件大小:92KB
文件格式:ZIP
更新时间:2021-05-02 13:40:07
JavaScript SCSS解析器 入门 let { parse , stringify } = require ( 'scss-parser' ) // Create an AST from a string of SCSS let ast = parse ( '.hello { color: $red; }' ) // Modify the AST (see below for a better way to do this) ast . value [ 0 ] . value [ 0 ] . value [ 0 ] . value [ 0 ] . value = 'world' // Convert the modified AST back to SCSS let scss = stringify ( ast ) // .world { color: $red; } 遍历 为了方便地遍历/修改生成的A
【文件预览】:
scss-parser-master
----.travis.yml(115B)
----package.json(678B)
----LICENSE(1KB)
----package-lock.json(242KB)
----CONTRIBUTING.md(949B)
----.npmignore(34B)
----.gitignore(24B)
----lib()
--------index.js(2KB)
--------parse.js(17KB)
--------__tests__()
--------input-stream.js(4KB)
--------stringify.js(3KB)
--------token-stream.js(13KB)
----README.md(3KB)
----.editorconfig(218B)

网友评论