Foundry Industrial Strength JavaScript

The Foundry Starter Project

05 May 2014

Starting a Foundry application is easy. Just download a copy of the Foundry Starter Project, and run a few NodeJS and Bower commands and you're up and running.

Download The Foundry Starter Project

What You'll Need

Getting Started

  1. Download the Starter Project and unzip it to your computer
  2. Install the Node dependencies: npm install
  3. Rename .bowerrc_example to .bowerrc. This will cause all Bower components to be stored in a directory called vendor.
  4. Install the Bower components: bower install
  5. Build the example application: grunt
  6. Configure a web server or virtual host to use the bootstraping project's root folder as the public directory in the host.
  7. Visit that URL in a web browser

This gives you a generic "Welcome to Foundry" application that does little more than render a view. It does give you the following features:

Project File Structure

The app directory contains all the JavaScript and template files for your Foundry application. Inside that is three more directories: models, modules and views.

Each of the subdirectories are pretty self explanatory. The views directory is where you would place all of your Mustache templates. Bloodhound is used to find the views to render, and it has already been configured to AJAX in the source code for a view if it does not exist on the page already.

The config/files.json file is where the base framework and your application will be assembled. JavaScript source files are concatenated and minified upon running grunt from the command line, and the results are saved into the dist/ directory. Out of the box, the Foundry framework is ~61KB minified.

The spec/javascripts directory is where you would place all of your Jasmine specs. The vendor directory is where all the external dependencies are defined for your application.