Hassle-free third-party dependencies
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Hassle-free third-party dependencies

This repository was created for the Hassle-free third-party dependencies blog post on engineroom.teamwork.com.

Set up

Prerequisites: Node.js, Bower & Gulp.

You'll need to run these commands one time to set up the project ready:

  1. npm install. This will install the devDependencies in package.json into the node_modules directory.
  2. bower install. This will install the dependencies in bower.json into the app/third-party directory.

Preprocess the dependencies

Run this initially and anytime after you add / remove / update a Bower dependency:

  1. gulp. This will generate app/third-party.css and app/third-party.js.
  2. Open / reload app/index.html

Further simplifications

From the article:

It could be simplified even more, for example:

  • Add a Gulp task to watch the bower.json for changes, then recompile the third-party files and reload the page.
  • Combine our own style.css and main.js with third-party.css and third-party.js so we'd only have to load one CSS and one JavaScript file.
  • Add source maps.

But I'll leave that up to you :)