-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Dependencies to the Project
connercowling edited this page Apr 14, 2015
·
3 revisions
It is common for libraries to be registered with Bower. Registration allows the library to be installed with a short bower install command. cd
into the branchr-client directory and run the bower install command:
bower install --save <dependency-name>
The --save
argument adds the dependency to the project's bower.json file. You should see the dependency listed within the dependencies
object within bower.json.
Next we need to make gulp aware of the dependency by adding it to the function below.
gulp.task('bower-copy-js', ['bower'], function() {
var deps = [
'es6-module-loader/dist/es6-module-loader.js*',
'traceur/traceur.min*',
'system.js/dist/system.js*',
'vue/dist/vue.min*',
'director/build/director.min.js',
'furtive/scss/all.scss',
<path-to-dependency-name>
];
return gulp.src(deps.map(function(dep) {
var a = path.join(paths.bower.src, dep);
console.log(a);
return a;
}))
.pipe(gulp.dest(paths.js.dest))
});
While still inside of the branchr-client, run npm install
.