Giter Site home page Giter Site logo

bower-to-s3's Introduction

#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
});

bower-to-s3's People

Contributors

nikrangan avatar unsetbit avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.