Skip to content

Latest commit

 

History

History
165 lines (116 loc) · 9.37 KB

DETAILS.md

File metadata and controls

165 lines (116 loc) · 9.37 KB

Additional details to supplement the brief nature of the README file.

Table of contents

AMD support

We recommend only loading the controls you need (eg fuelux/checkbox).

If using AMD (such as RequireJS), reference the FuelUX directory in your paths configuration, wherever it is located:

require.config({
    paths: {
        'fuelux': 'http://www.fuelcdn.com/fuelux/3.14.2/'
        //...
    }
});

Then list any individual fuel ux controls needed as dependencies within your application modules:

define(function(require) {
    var spinbox = require('fuelux/spinbox');
    //...
});

In instances where you require every module from Fuel UX, you can use fuelux/all instead of listing each module individually.

Fuel UX also supports placing components in their own <script> tags. Be sure to check component dependencies in the controls documentation and put modules in the correct order if you load them in this method. Errors will appear in the console if you have not loaded dependencies correctly ((Repeater)[http://getfuelux.com/javascript.html#repeater-dependencies] and Scheduler are the only components with dependencies currently).

Compiling code

Fuel UX is lightweight to give you a fast dependable foundation to build upon. It uses Grunt with convenient methods for working with the library. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed, and then run some Grunt tasks.

Install grunt

From the command line:

Install Dependencies

In terminal from root directory of fuelux repo:

  1. npm install
  2. bower install

Grunt tasks

Run grunt --help or check out the Gruntfile to see all possible grunt tasks. When contributing, these are the grunt tasks you will be most likely to use:

Serving - grunt serve

Starts a watch server for automated javascript validation and basic tests (JSHint, simplified QUnit) allowing for prototyping at http://localhost:8000/ (not good for unit testing because server catastrophically fails if unit test fails).

Serving - grunt servefast

Starts a watch server allowing for prototyping at http://localhost:8000/ visual review of tests at http://localhost:8000/test/.

Testing - grunt

Runs JSHint and full suite of QUnit tests.

Building dist - grunt dist

This builds the dist directory (compiling your CSS and JS). If you are going to issue a pull request, you should not include changes to the dist directory that are generated from this grunt task.

Troubleshooting dependencies

Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun npm install.

Running docs locally

  1. If necessary, install Jekyll (requires v2.3.x).
  1. Install the Ruby-based syntax highlighter, Rouge, with gem install rouge.
  2. From the root /fuelux directory, run jekyll serve in the command line.
  3. Open http://localhost:9001 in your browser, and voilà.

Contributors

Giving credit where credit is due.

Major Contributors (a-z)
Adam Alexander adamalex on Twitter adamalex on Github
Matt Beard mbeard on Github
Bryan Kohlmeier bkohlmeier on Github
Dustin McCormick djmccormick on Twitter djmccormick on Github
Christopher McCulloh @cmcculloh on Twitter cmcculloh on Github cormacmccarthy on Github
Scott Plumlee scottplumlee on Twitter plumlee on Github
Marvin Pribble marvinpribble on Github
Ryan Moore rbmoore on Github
Steven Rogers soldoutactivist on Github
Alex Vernacchia (current) vernacchia on Twitter vernak2539 on Github
David Waltz (current) dwaltz on Github

Travis CI

Pull requests are validate via Travis CI.

Periodically pull requests may fail Travis CI build integration testing with a false negative. If you suspect this is the case you can restart the test via the command line (see below).

Travis downloads the node_modules folder from the "Edge" server ("fuelux-edge") hosted on Heroku. If you add or update a dependency in package.json, you will need to also update package.json in master locally and push it to Heroku for the dependency errors to be resolved in Travis.

Install Travis CI Client

Travis requires ruby and the appropriate ruby gem.

Restarting a Travis CI Build

From the Browser

  1. On the Pull Request page on Github, click on the "details" link in the Travis CI build area
  2. Click "Login with Github" at the top right of the page
  3. Click the "Restart Build" button (circular button with an arrow going in a circle)

From the Command Line

  1. Login to Travis In the terminal, issue the following command (You'll need to use your Github credentials):

    travis login --org
    
  2. Acquire build number In the terminal, issue the following command:

    travis history
    
  3. Restart Build using the build number you obtained from travis history In the terminal, issue the following command:

    travis restart 9999
    

Edge servers

We have an "Edge Server" on Heroku named "fuelux-dev". If you have permissions to the ExactTarget org on Heroku, you can get information on cloning the fuelux-dev remote from its app page on Heroku. If you do not have permissions and believe you should, please contact one of the FuelUX project maintainers.

A build of master is available at https://fuelux-dev.herokuapp.com/dist/js/fuelux.js and https://fuelux-dev.herokuapp.com/dist/css/fuelux.css.

These files should be considered unstable as this is our dev server

To create your own edge server, setup a github web hook on Heroku for this repository and put the app into development mode with heroku config:set NPM_CONFIG_PRODUCTION=false.