Git Product home page Git Product logo

svgobjectmodelgenerator's Introduction

SVG Object Model Generator Build Status

An abstract object model generator and SVG writer.

Overview

This engine is designed to meet the needs of modern SVG and to be sharable by any client apps that can generate the standard JSON.

The engine currently works, in an experimental manner, with Photoshop Generator.

License

All code is offered under the Apache License Version 2.0.

Development

We ๐Ÿ‘ pull requests! If you submit one, please also sign our Contributor License Agreement.

Setup Generator

The generator plugin adds Copy Generator DOM to make it easy to get test data for the svgOMGenerator

cd generator/plugins/  
ln -s /path/to/svgObjectModelGenerator svgObjectModelGenerator

Running the tests

The tests rely on mocha and chai, so make sure you have run npm install in your repository. Then, to run the tests, all you have to do is run npm test.

Debugging the tests

The tests can be debugged using npm run-script test-debug

Code Coverage

Generate the code coverage report "svgomg-code-coverage.html" by running npm run-script cover

Getting more test data

The test data comes from processing PSDs using the generator plugin defined in main.js. With the plugin running and your PSD open in Photoshop use File > Generate > Copy Generator DOM. This copies the generator JSON to your clipboard.

Now, create a file with the PSD's name adding "-data.js" to the end, so "file.psd" becomes "file-data.js" Inside the file define the data so it can be loaded using require

module.exports = DATA;

Please don't check binary PSD files into this repo.

svgobjectmodelgenerator's People

Contributors

chrisbank avatar dirkschulze avatar dmitrybaranovskiy avatar heycam avatar jhatwich avatar joelrbrandt avatar mvujovic avatar nimbupani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.