Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function buildSketch(designInfo) {
const newSketch = new Sketch();
buildComponents(designInfo);
buildFlows(designInfo, newSketch);
buildLibrary(designInfo, newSketch);
newSketch.build('output.sketch');
}
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: {