Skip to content
/ xd-file Public

Methods to make is easier to manipulate an Adobe XD file

Notifications You must be signed in to change notification settings

Lona/xd-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xd-file

An Adobe XD file is a zip file containing a bunch of JSON/XML/plain text files.

This package aims to make is easier to manipulate such a file.

Installation

npm install xd-file

Usage

There are 4 different methods available:

readXDFile

(filePath: string) => Promise<{
  document: Object,
  interactions: Object,
  metadata: Object,
  resources: Object,
  artboards: Array<Object>,
}>

createNewXDFile

(documentId?: string, artboards?: Array<{
  id: string
  name?: string
  layers?: Object[]
  width: number
  height: number
  x: number
  y: number
  viewportHeigh: number
}>) => Promise<{
  document: Object,
  interactions: Object,
  metadata: Object,
  resources: Object,
  artboards: Array<Object>,
}>

writeXDFile

(xdFile: {
  document: Object,
  interactions: Object,
  metadata: Object,
  resources: Object,
  artboards: Array<Object>,
}, filePath: string) => Promise<void>

generateId

;(seed?: string) => string

About

Methods to make is easier to manipulate an Adobe XD file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published