Code Monkey home page Code Monkey logo

hull-js's Introduction

Hull.js Codeship Status for hull/hull-js

Building the library

Checkout

git clone [email protected]:hull/hull-js.git

First, install grunt and bower

sudo npm install -g grunt-cli

Then switch to hull-js dir

cd hull-js
npm install
grunt

The last command will start a static HTTP server (port 3001) that serves the files located in the root folder.

Using the boilerplate app

A boilerplate app is located in the app folder. Here's how to use it:

cp app/app.example.js app/app.js
grunt

Grunt will automatically start a server. When it is done, you can point your browser to http://localhost:3001/app

Note: You must configure app/app.js with the settings of your app, as found in your account at https://accounts.hullapp.io.

Main grunt tasks

  • dist: Builds and executes the tests
  • server (default task): dist + starts a static HTTP server for local use
  • deploy: dist + Additional flavors + S3 upload (see MAINTENANCE.md)

Developing locally (force @hull components to be fetched locally)

Modify app/index.html as follows:

<script src="http://localhost/dist/%%CURRENT_VERSION%%/hull.js"></script>
<script>
  Hull.init({
    appId: 'YOUR_APP_ID',
    orgUrl: 'YOUR_APP_ID',
    jsUrl: 'http://localhost/dist'
  });
</script>

Contributing

You're encouraged to submit pull requests, propose features and discuss issues.

If you want to submit code:

  • Fork the project
  • Write tests for your new feature or a test that reproduces a bug
  • Implement your feature or make a bug fix
  • Commit, push and make a pull request. Bonus points for topic branches.

##Components

If you created a component and want it featured in the marketplace, be sure to provide documentation with the following syntax.

The human-readable version of the documentation will be auto-generated when your component is integrated in the marketplace.

Component Description Template:

/**
 *
 * Description
 *
 * # MANDATORY
 * @name Component Name
 * @param {String} optionName Optional/Required. Option description
 * @example <div data-hull-component="login/button@hull"></div>
 * # OPTIONAL
 * @template {template_name} template_description
 * @datasource {activities} The activity stream that will be displayed.
 * @action {achieve} Achieve the achievement with the entered secret
 * @your_custom_tag {name} value
 * @your_custom_tag value
 */
 */

For instance:

/**
 * Displays comments on an object, that can be an internal Hull object (when you specify data-hull-id) or an entity, (with data-hull-id:'entity:ENTITY')
 * If using an Entity, any unique string you generate can be used to attach comments
 *
 * @name List
 * @param {String} id Required The object you want to comment on.
 * @param {String} focus  Optional Auto-Focus on the input field. default: false.
 * @datasource {comments} Collection of all the comments made on the object.
 * @action {comment} Submits a new comment.
 * @action {delete} Deletes a comment.
 * @action {flag} Flags a  comment.
 * @template {list} The main templates. Displays this list of comments.
 * @template {form} The form to enter a new comment.
 * @example <div data-hull-component="comments/list@hull" data-hull-id="entity:http://hull.io"></div>
 * @example <div data-hull-component="comments/list@hull" data-hull-id="510fa2394875372516000009"></div>
 * @example <div data-hull-component="comments/list@hull" data-hull-id="app"></div>
 */

License

MIT License. See LICENSE for details.

Copyright

Copyright (c) 2013 Hull, Inc.

hull-js's People

Contributors

allforabit avatar crystalschang avatar julienxx avatar oliger avatar ryanmcdonough avatar sbellity avatar unity avatar victa avatar xavierdutreilh avatar xcambar avatar

Watchers

 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.