Git Product home page Git Product logo

chassis-libx's Introduction

NGNX Chassis library GitHub version Build Status

The NGNX Chassis JS library extends the NGN platform. It consists of opinionated building blocks that are of use but do not fit the more generic nature of NGN.

Getting Started

Installation Options:

  • CDN
  • Bower
  • npm

CDN

The easiest way (recommended for development) to use Chassis extensions is via a CDN.

<script src="//cdn.jsdelivr.net/chassis/latest/chassis.x.min.js"></script>

You can also specify a specific release instead of using latest.

Load only what you need

Chassis extensions are relatively small, but they're growing in number. It is useful to have all extensions available during development, but production use will be more performant using only what is necessary.

You can generate a custom URL with the JSDelivr CDN.

You can see a list of all available individual components. Any file that doesn't begin with chassis.___ is an individual component. Keep in mind that some components rely on others. Since these dependencies may change as this library evolves, we've embedded warnings. If something doesn't look right, your console output should give you a clue.

Bower

If you use bower to manage UI dependencies, you can install & use it as follows:

bower install x-chassis

In your HTML:

<html>
  <head>
    <script src="bower_components/chassis/dist/chassis.x.min.js"></script>
  </head>
  <body>
    ...
  </body>
</html>

npm

The npm installation is designed for projects in a node-like environment, such as electron or NW.js. Usage is straightforward:

npm install ngnx-chassis
require('ngnx-chassis')(function () {
  // ... code ...
})

This automatically creates the NGNX global variable supporting the full Chassis extension library. It dynamically adds the Chassis extension <script> tag to the head of the rendered HTML page and executes the callback when complete.

Debugging | Development

Find an error in Chassis Extensions? Unminified versions are available (full library only) through the rawgit CDN. You must specify the version as shown below.

<script src="//cdn.rawgit.com/ngnjs/chassis-lib/<version>/dist/chassis.dev.js"></script>

Reporting Issues

If you encounter an issue, please file it in the issues. We'll do our best to fix problems in a timely manner, but remember this is software we voluntarily support (one of several projects).

If you want to expedite resolution, one of the most effective ways to do so is to write a regression test. By adding a regression test, you're recreating the issue, saving us alot of time.

Hacking on Chassis Extensions

If you want to hack on Chassis Extensions, fork the repository and make your changes. Make sure they pass the existing unit tests, and (if appropriate) add new unit tests.

Chassis uses karma and tap/tape for unit testing. For pre-production CI testing, we use Sauce Labs to test against a myriad of browsers. However; this can be a time consuming process when making lots of changes or simple small updates.

To make development easier, there is a separate npm script for running a "gut check" within your local development environment: npm run-script localtest. It only tests against Chrome, which must be installed on your local computer to work. This opens a new Chrome window, runs the tests, then closes Chrome. Again, this is a "gut check" designed for rapid local development. Most tests that pass in Chrome will pass is other modern browsers, but not everything. If you have concerns, check caniuse.com to see what is supported and what isn't.

At this time, Chassis targets support for Chrome 40+, Firefox 31+, IE 11, Edge 13, Safari 9, and Opera 27. Since Opera tracks Chrome, we're not terribly concerned with Opera tests as long as Chrome tests pass. When Microsoft Edge support becomes more prevalent, we will eventually drop IE support.

Project Status

Build Status

Sauce Test Status

chassis-libx's People

Contributors

coreybutler avatar

Watchers

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