npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fury-bower-resolver

v0.3.2

Published

Install private Bower packages from Gemfury

Downloads

226

Readme

Bower Resolver for Gemfury

npm version

This is an extension to Bower package manger to enable installation of private and public packages from Gemfury. This guide is a short summary of enabling and using this extension with Bower, if you want to learn more about using Bower with Gemfury, please take a look at our Bower private repository documentation.

Gemfury is your personal cloud for private and public Bower, npm, and other packages. Once you upload your packages and enable Gemfury as a source, you can securely deploy any package to any host. It's simple, reliable, and hassle-free.

Initial set-up and configuration

To get started, please install Bower (1.5.0+) and this resolver:

npm install -g fury-bower-resolver

You will also update your .bowerrc file to use this resolver. This can be done globally or per-project:

{
  "resolvers": [
    "fury-bower-resolver"
  ]
}

That's it! You can now install Bower packages from Gemfury.

Installing packages from Gemfury

Once you've enabled this resolver, you can install packages individually:

bower install fury://username/pkg-name

Or include them as a dependency in your project's bower.json:

{
  "dependencies": {
    "pkg-name": "fury://username/pkg-name#1.1.*"
  }
}

Authenticating to install private packages

Without authentication, this resolver allow you to install public packages from any Gemfury account. To install private packages, you need to provide your secret Gemfury token. You can get this token from your Gemfury dashboard, and pass it to the resolver using the FURY_TOKEN environment variable:

FURY_TOKEN=mY-sEcRet-token bower install

If it's not possible for you to modify the environment of your Bower installation, or you would like to save your token during development, you can specify it via ~/.bowerrc:

{
  "furyResolver": {
    "authToken": "mY-sEcRet-token"
  }
}

We can only recommend this method for local development. Please do not commit your secrets/passwords into your SCM or distributed packages.

Advanced: Enabling cascading auto-discovery

This resolver has two modes of operation: implicit and explicit. As shown above, explicit mode allows you to choose which packages will come from a Gemfury account by specifying a fury:// source. Alternatively, implicit mode, when enabled, will try to install all packages from your Gemfury account, falling back on the default public registry for packages not found in Gemfury. Explicit sources can be used with or without enabling implicit mode.

Explicitly specifying Gemfury packages

Explicit mode lets you specify which packages come from your account by using a Gemfury-specific URL as package source. The URL format is as follows:

fury://<account-username>/<package-name>

So your dependencies in bower.json will look as follows. In this case, moment will be installed from my-org Gemfury account, while jquery will come from the public registry:

{
  "dependencies": {
    "moment": "fury://my-org/moment#2.0.*",
    "jquery": "^2.0.0"
  }
}

Implicitly overriding packages with Gemfury

Implicit mode allows you to keep your existing bower.json, while this resolver checks your Gemfury account for existence of each package by name, falling back on the default public registry for those not found in your account.

Implicit mode is disabled by default. To enable it, please specify which account to search in your .bowerrc:

{
  "furyResolver": {
    "locateInAccount": "my-gemfury-username"
  }
}

Example: Putting it all together

For example, let's say that my personal Gemfury username is johnny, and I work at an organization fury-org. Our main package is fury-unleashed, and we have our own patched version of moment - both in fury-org account.

I will set up ~/.bowerrc on my laptop as follows:

{
  "resolvers": [
    "fury-bower-resolver"
  ],
  "furyResolver": {
    "authToken": "my-personal-token",
    "locateInAccount": "fury-org"
  }
}

Now, I can have the following dependencies in my bower.json:

{
  "dependencies": {
    "my-fury-hacks": "fury://johnny/my-fury-hacks",
    "fury-unleashed": null,
    "moment": "^2.11.0",
    "jquery": "^2.0.0"
  }
}

Here's what will happen with each of those packages, given the configuration:

my-fury-hacks:   installed from my personal account johnny
fury-unleashed:  implicitly found and installed from fury-org
moment:          implicitly found and installed from fury-org
jquery:          installed from public registry after not finding it in fury-org

Contribution and Improvements

Please email us if we've missed some key functionality or you have problems installing your packages. Better yet, fork the code, make the changes, and submit a pull request to speed things along.

Submitting updates

If you would like to contribute to this project, just do the following:

  1. Fork the repo on Github.
  2. Add your features and make commits to your forked repo.
  3. Make a pull request to this repo.
  4. Review will be done and changes may be requested.
  5. Once changes are done or no changes are required, PR will be merged.
  6. The next release will include your changes.

Please take a look at the issues page if you want to get started.

Feature requests

If you think it would be nice to have a particular feature that is presently not implemented, we would love to hear your suggestions and consider working on it in the future. Just open an issue in Github.

Questions

Please email [email protected] or file a Github Issue if you have any other questions or problems.