Code Monkey home page Code Monkey logo

sketch-to-html's People

Contributors

small-tou avatar sunnylqm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sketch-to-html's Issues

手机端

手机端转出来的html没法直接用,有解决方案吗

Cannot read property 'points' of undefined

问题: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对象

If element has no image background

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));

关于运行

请问该怎么运行呢? npm example 似乎不行。
node example 报错

const decodedAttributedString = parseArchive(attributedString.archivedAttributedString._archive);
^^^^^

SyntaxError: Unexpected token const

谢谢~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.