0.4.2 • Published 3 years ago

@iryn/data2html v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

sketch 设计稿直接 转 html ,可以覆盖绝大多数情况,完美复原 sketch 稿

提供以下三种方法

  • sketch2html:只能在 node 中使用
  • sketch2data:只能在 node 中使用
  • data2html:可以在浏览器中使用,将 sketch2data 的数据传入,返回 html 字符串和 css 字符串

代码示例

const { sketch2html, sketch2data, data2html } = require("@iryn/sketch2html");
sketch2data("./sketch/demo.sketch", "./output");
sketch2html("./sketch/demo.sketch", "./output");

命令行使用

# 生成 html:
sketch2html -i ../sketch/demo.sketch -o ../output

# 生成数据(按页面生成多个 json 文件)
  sketch2data -i ../sketch/demo.sketch -o ../output

兼容

sketch 版本:仅测试 72.1 版本

致谢

https://github.com/xinyu198736/sketch-to-html

0.4.2

3 years ago

0.3.9

3 years ago

0.3.8

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.6

3 years ago

0.3.7

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.3

3 years ago

0.3.0

3 years ago

0.2.9

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.8

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.1

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.0

3 years ago

0.1.9

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.8

3 years ago

0.0.9

3 years ago

0.1.7

3 years ago

0.0.8

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.6

3 years ago

0.0.7

3 years ago

0.1.5

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago