Skip to content

v3.0.0

Choose a tag to compare

@kdzwinel kdzwinel released this 23 Apr 14:08
· 83 commits to master since this release

This release is 90% handmade by @TheReincarnator 👏Thank you!

Breaking

If you were importing models (e.g. Page, Document, Text, SymbolMaster etc.) like so:

import Document from '@brainly/html-sketchapp/html2asketch/document';
import SymbolMaster from '@brainly/html-sketchapp/html2asketch/symbolMaster';

please update to:

import {Document, SymbolMaster} from '@brainly/html-sketchapp';

That's it ✨

New

  • two new top level methods 🔥
    • nodeTreeToSketchGroup - that walks given DOM subtree recursively and creates a tree of Sketch groups and layers
    • nodeTreeToSketchPage - that wraps nodeTreeToSketchGroup and crates a page with an (optional) Artboard where all groups and layers are placed

screen shot 2018-04-19 at 23 12 42

  • Artboard object
  • index.js file that lets you import html-sketchapp in a convenient way
import {Document, Page, Text, nodeToSketchLayers} from '@brainly/html-sketchapp';
  • TypeScript files with type definitions
  • skipSystemFonts option

some websites or component libraries use font-family lists starting with OS-specific fonts, if the option 'skipSystemFonts' is enabled, we skip those fonts to choose a font Sketch is capable of.

  • getRectangleName option that gives you full control over layer names

Improved

  • Fixed bug in the Page object where width and height were mixed up
  • ES5 transpilation for better compat
  • Electron compat improvements (BCR)