How to use the sketch-constructor.Sketch function in sketch-constructor

To help you get started, we’ve selected a few sketch-constructor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phodal / design / adapter / visual / sketch / index.js View on Github external
function buildSketch(designInfo) {
    const newSketch = new Sketch();

    buildComponents(designInfo);
    buildFlows(designInfo, newSketch);
    buildLibrary(designInfo, newSketch);

    newSketch.build('output.sketch');
}
github telekom / telements / packages / generator-sketch / src / index.tsx View on Github external
import { Sketch, Page, Artboard, Text, Rectangle } from 'sketch-constructor';
import * as sketchJson from 'sketch-json';
import * as fs from 'fs';

const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
const buildFolder = './build';

const newSketch = new Sketch({});
const pageWelcome = new Page({
  name: 'Welcome'
});

let yPos = 0;

const addYPos = (value: number = 0) => {
  return yPos = yPos + value;
}

const textVersion = new Text({
  string: `Version: ${pkg.version}`,
  name: `Version: ${pkg.version}`,
  fontSize: 16,
  color: "#777",
  frame: {

sketch-constructor

Read/write/manipulate Sketch files in Node without Sketch plugins!

Apache-2.0
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis