sketch-loader

0.1.2 • Public • Published

sketch-loader

https://travis-ci.org/xaviervia/sketch-loader.svg?branch=master npm version

Webpack loader for Sketch (+43) files

npm install --save sketch-loader
module: {
  loaders: [
    {
      test: /\.sketch$/,
      loader: 'sketch'
    }
  ]
}

Then importing:

import sketchFile from './some-file.sketch'
 
sketchFile.document // parsed contents of document.json
sketchFile.user // parsed contents of user.json
sketchFile.meta // parsed contents of meta.json
sketchFile.pages['0F364A54-A488-4D6F-BAA4-F93FB057C5A3'] // parsed contents of pages/0F364A54-A488-4D6F-BAA4-F93FB057C5A3.json, and so on for every page file

You can check the example in examples/simple/sagui.config.js

What is the structure of the contents?

As far as I know, there is no official documentation yet. Meanwhile this structure information from my explorations might be handy.

License

MIT License

Readme

Keywords

Package Sidebar

Install

npm i sketch-loader

Weekly Downloads

28

Version

0.1.2

License

MIT

Last publish

Collaborators

  • xaviervia