Skip to content
This repository has been archived by the owner on Apr 12, 2019. It is now read-only.

WorksApplications/bower-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

bower is slow, but if we use the dependencies with exact version, we can skip the git clone network traffic by checking versions before running bower install. This is what bower-checker does.

Build Status

How to use

bower config

Before using this library, you need to make sure all your bower components declared in bower.json or component.json needs to use exactly specified version string, like:

{
  "dependencies": {
    "bootstrap": "2.3.1",
    "html5shiv": "3.6.2",
    "jquery": "1.9.1"
  },
  "devDependencies": {
    "requirejs": "2.1.5",
    "almond": "0.2.1"
  }
}

range options in semver like ~2.1.1, >1.0.0 is not supported by this library.

use in node

Now if your bower.json is good, then just add bower-checker in your package's dependencies:

"devDependencies": {
  "bower-checker": "0.0.1",
}

then just call the install function to install you project's bower components:

var checker = require('bower-checker');

checker.install(function() {
    done();
});

It will only install the libraries which have a miss matched version than declared in bower.json, which means it won't fetch the git repository util you change the library version.

grunt task

If you want to use this library in your grunt task, it is easy, just add this in your Gruntfile.js:

    grunt.registerTask('bower', 'install external libraries by using bower', function() {
        var done = this.async();

        require('bower-checker').install(done);
    });

Issues

This repo is only for development, if you meet problems, please fire issues at:

https://github.com/WorksApplications/bower-checker/issues

About

A nodejs library to check existing components versions before running bower install.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published