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

bower-to-s3

v1.0.3

Published

Upload bower packages to S3

Downloads

23

Readme

#bower-to-s3

Upload bower packages to S3

Bower to S3 synchronizes an S3 bucket + prefix with the contents of a given Bower package.

Usage via the Command Line

# Install as a global executable
$ npm install -g bower-to-s3
$ bower-to-s3 -h # print help
  Usage: bower-to-s3 [options] package bucket

  Options:

    -h, --help                   output usage information
    -b, --base [directory]       The base directory within the Bower package to use. (Defaults to "./")
    -s, --select [glob pattern]  The glob pattern to use in the base directory when selecting files to upload. (Defaults to "**/*")
    -v, --version [number]       The package version to upload. If fuzzy the latest matching one is used. (Defaults to latest release)
    -p, --prefix [prefix]        The prefix in the S3 bucket to upload to. (Defaults to root of the S3 bucket)
    --keyId [key id]             The AWS Access Key Id to use when uploading files.
    --accessKey [access key]     The AWS Access Key to use when uploading files.

Usage via the API

# Install as a local package
$ npm install --save bower-to-s3
// Inside a JavaScript file...

var bowerToS3 = require('bower-to-s3');

bowerToS3({
  // Required options
  // A bower package name or url.
  pkg: 'my-package',

  // Required. The AWS Access Key Id to use when uploading the package.
  awsAccessKeyId: 'abcdef',

  // The AWS Secret Access Key to use when uploading the package.
  awsSecretAccessKey: '123456',

  // The S3 bucket name to upload the package to.
  bucket: 'the-s3-bucket',

  // Optional options
  // The version of the bower package to use. Defaults to latest release.
  version: '1.8',

  // The base directory in the bower package to upload. Defaults to './'.
  base: './dist',

  // The glob pattern to use when selecting files to upload. Defaults to '**/*'.
  select: '**/*.js',

  // The prefix within the S3 bucket to upload the files to. Defaults to ''.
  prefix: 'version-1.8'
}).then(function(){
  // The bowerToS3 call returns a promise, use .then to be notified of completion.
}).catch(function(e){
  // Errors can be caught by using .catch
});