Giter VIP home page Giter VIP logo

mockdown-client's Introduction

mockdown-client

What is this?

A JavaScript module (written in TypeScript) for interfacing with the mockdown server interface, plus some utilities for working with constraints as well as Cassowary (kiwi.js).

How do I install it?

First, compile it:

yarn build // or npm run build

Then link it:

yarn link // or npm link

And finally, in any project you want to use your copy of this package:

yarn link mockdown-client // or npm link mockdown-client

(Instructions are more or less the same if you use npm link.)

How do I use it?

How do I get some constraints for my examples?

If you have examples such as:

const examples = [
    {
        "name": "p",
        "rect": [0, 0, 100, 100],
        "children": [/*...*/]
    },
    // ...
]

Then you can just:

import {fetchConstraints} from 'mockdown-client';

// If you live in the future:
const constraints = await fetchConstraints(examples);

// And if you don't, then:
fetchConstraints(examples).then((constraints) => {
    // ...
});

mockdown-client's People

Contributors

dylanlukes avatar jsarracino avatar algebrot avatar

Stargazers

Jason Wu avatar

Watchers

 avatar James Cloos avatar Nadia Polikarpova avatar  avatar

Forkers

js0nwu

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.