Skip to content

migijs/jaw

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
web
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Parasitize CSS into JSX for migi

jaw取自动漫寄生兽中寄生于下巴上的Parasite,意指将css寄生在jsx上。

NPM version Build Status Coverage Status Dependency Status

INSTALL

npm install jaw

logo

文档

https://github.com/migijs/jaw/wiki/%E6%96%87%E6%A1%A3

API

  • parse(code:String, option:Object):JSON 传入要解析的css代码,返回格式化好的json对象,option参数如下
  • noMedia:Boolean 无需default和media键,即没有media query逻辑,如事件代理使用
  • noValue:Boolean 无需值,在有值的时候_v字段仅为true,如事件代理使用
  • noPriority:Boolean 无需优先级,json中没有_p字段
  • tokens():Array<Token> 返回css的token列表
  • ast():Object 返回css的语法树

Demo

License

[MIT License]

Releases

No releases published

Packages

No packages published