Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
abstractconnect
Advanced tools
This package retrieves symbols from a specified sketch file stored in abstract, models the data neatly and transposes sketch format styles into more webdev(tm) friendly values.
import { getSymbols } from 'abstractconnect';
getSymbols({
filter: symbol => symbol.name === 'MySymbol'
}).then(({ MySymbol }) => {
//select your layer by name
const MyLayer = MySymbol.layers.MyLayerName
//do whatever it is you want to do with design information
const someCSS = `
font-size: ${MyLayer.style.text.fontSize}px;
background: ${MyLayer.style.background};
`;
//etc
});
takes a single parameter, an object with config:
filter
: expects a standard js filter functionraw
: set to true
to get the 'raw' symbol data from sketchfromSHA
: target a specific commit in abstractwithFS
: force download to FS (ends up in the TEMP_PATH setup var below)This package is configured using environment values. Simplest setup is to drop a .env
file in your project directory.
ABSTRACT_TOKEN=<YOUR DEVELOPER TOKEN>
ABSTRACT_PROJECT_ID=<YOUR PROJECT ID>
ABSTRACT_FILE_NAME=<THE NAME OF YOUR SKETCH FILE>
ABSTRACT_BRANCH=<OPTIONAL: DEFAULTS TO 'master'>
LOG_LEVEL=<OPTIONAL: to turn off console info add this to equal 'silent'>
TEMP_PATH=<OPTIONAL: DEFAULTS TO <YOURPROJECTPATH>/temp
finding your project id
The simplest way to find your project id is to open your project in browser, and collect the id from the url: https://app.abstract.com/projects/<PROJECT_ID>/
;
FAQs
connect designs managed in abstract to your code
The npm package abstractconnect receives a total of 0 weekly downloads. As such, abstractconnect popularity was classified as not popular.
We found that abstractconnect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.