Giter VIP home page Giter VIP logo

johnhbenetech.github.io's Introduction

Vellum

Build Status

Vellum is a JavaRosa XForm designer used in CommCare HQ.

Image courtesy of the ReMIND project.

Usage

Checkout the source from GitHub

Optionally, build an optimized version

$ make # artifacts will be in _build dir and also vellum.tar.gz

Then load it on a page using RequireJS, optionally with an existing jQuery instance:

<link rel="stylesheet" href="path/to/bootstrap.css"></link>
<link rel="stylesheet" href="path/to/vellum/style.css"></link>
<!-- optional, if using bundled jquery et al -->
<link rel="stylesheet" href="path/to/vellum/global-deps.css"></link>

<!-- 
Optionally reuse existing jQuery instance with Bootstrap.  
If not present, bundled versions will be loaded.  -->
<script src="jquery.js"></script>
<script src="bootstrap.js"></script>

<script src="require.js"></script>
<script>
    require.config({
        packages: [
            {
                name: 'jquery.vellum',
                location: "/path/to/vellum/src"
            }
        ]
    });

    require(["jquery.vellum"], function () {
        require(["jquery"], function ($) {
            $(function () {
                $('#some_div').vellum(VELLUM_OPTIONS);
            });
        });
    });
</script>

See here and tests/main.js for example options usage.

Vellum targets modern browsers. IE8 and earlier are not supported.

Contributing

Follow the Airbnb JavaScript Style Guide.

Install dependencies:

$ npm install

Build optimized version (test locally by changing useBuilt in tests/main.js):

$ make

Test in a browser:

$ `npm bin`/http-server -c-1
$ chromium-browser http://localhost:8080

By default, the test page will load the non-built version unless a built parameter is present in the query string.

Commands to run tests headlessly:

$ npm test
$ ./test
$ ./test --help # for advanced usage

Make dependency graph image:

$ make madge

Testing on Heroku

NOTE: this is outdated, and may not work anymore

This repo can be deployed to Heroku using heroku-buildpack-vellum, which is just a fork of heroku-buildpack-static with the build script from the standard Node.js buildpack added in order to install dependencies.

Until prune.io is available, we use Rainforest's fourchette along with a slightly modified version of their example fourchette app in order to create an isolated test environment for each Pull Request on Heroku.

The latest master is also deployed to vellum-master.herokuapp.com using drone.io. See here for a list of builds.

johnhbenetech.github.io's People

Contributors

johnhbenetech avatar

Watchers

James Cloos avatar  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.