small-tou / sketch-to-html Goto Github PK
View Code? Open in Web Editor NEW从 sketch 转换成 html,已无更新。。
从 sketch 转换成 html,已无更新。。
这个思路完全可以产品化的,不会比蓝湖差,可以持续运作啊。
手机端转出来的html没法直接用,有解决方案吗
问题:sketch 55以上的版本,在使用这个包时,会报错。
代码描述:`
sketch-to-html-master/util.js:99
if (path.points.length !== 4) {
}
`
看了下新版本的sketch在打印sketch导出的对象后,确实没有,path.points
`
{ _class: 'page',
do_objectID: '016FAAC1-276E-4AD6-B80C-6CFBA4D6299B',
booleanOperation: 0,
isFixedToViewport: false,
isFlippedHorizontal: false,
isFlippedVertical: false,
isLocked: false,
isVisible: true,
layerListExpandedType: 0,
maintainScrollPosition: false,
name: 'ooto Productivity Dashboards',
nameIsFixed: true,
resizingConstraint: 0,
resizingType: 0,
rotation: 0,
shouldBreakMaskChain: false,
exportOptions:
{ _class: 'exportOptions',
includedLayerIds: [],
layerOptions: 0,
shouldTrim: false,
exportFormats: [] },
frame:
{ _class: 'rect',
constrainProportions: false,
height: 300,
width: 300,
x: 0,
y: 0 },
clippingMaskMode: 0,
hasClippingMask: false,
style:
{ _class: 'style',
do_objectID: 'A2C84584-21E6-477A-8D77-DEA98F3318EF',
endMarkerType: 0,
miterLimit: 10,
startMarkerType: 0,
windingRule: 1,
blur:
{ _class: 'blur',
isEnabled: false,
center: '{0.5, 0.5}',
motionAngle: 0,
radius: 10,
saturation: 1,
type: 0 },
borderOptions:
{ _class: 'borderOptions',
isEnabled: true,
dashPattern: [],
lineCapStyle: 0,
lineJoinStyle: 0 },
borders: [],
colorControls:
{ _class: 'colorControls',
isEnabled: false,
brightness: 0,
contrast: 1,
hue: 0,
saturation: 1 },
contextSettings:
{ _class: 'graphicsContextSettings', blendMode: 0, opacity: 1 },
fills: [],
innerShadows: [],
shadows: [] },
hasClickThrough: true}
`
部分json对象
可以不带id吗 id看着太难受了
The build process will crash if there is no image background on a layer.
So if you make a new sketch file that have just one page and one artboard and make Rectangle without background image the npm run example will give fs.js:961
binding.lstat(pathModule.toNamespacedPath(path));
如题。
解压 sketch 可以出来一些 json 文件,这些 json 文件里的各个属性的意思,哪里有文档说明啊?刚接触这块,不太懂,求教!
Windows下不支持rm -rf
之类的命令
请问该怎么运行呢? npm example 似乎不行。
node example 报错
const decodedAttributedString = parseArchive(attributedString.archivedAttributedString._archive);
^^^^^
SyntaxError: Unexpected token const
谢谢~
Window下的使用rm 有问题.
建议使用函数来操作
sketch转html这个就用过网址https://kuaiui.cn 还能标注,这个网站是免费的。psd可以转成sketch再转成html,你进官网看下教程就知道了,唯一缺点就是只能苹果电脑支持
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.