Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-s3

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-s3

A grunt task to automate moving files to/from Amazon S3.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
141
decreased by-44.27%
Maintainers
1
Weekly downloads
 
Created
Source

Grunt + Amazon S3

About

Amazon S3 is a great tool for storing/serving data. Thus, there is a chance it is part of your build process. This task can help you automate uploading/downloading files to/from Amazon S3. All file transfers are verified and will produce errors if incomplete.

Dependencies

  • knox
  • async
  • underscore.deferred

Configuration

Here is an example grunt.js configuration showing you all possible configuration.

grunt.initConfig({

  s3: {
    key: 'YOUR KEY',
    secret: 'YOUR SECRET',
    bucket: 'my-bucket',

    // Available values:
    // private | public-read | public-read-write | authenticated-read | bucket-owner-read | bucket-owner-full-control
    access: 'public-read',

    // Files to be uploaded.
    upload: [
      {
        src: 'important_document.txt',
        dest: 'documents/important.txt'
      },
      {
        src: 'passwords.txt',
        dest: 'documents/ignore.txt',

        // These values will override the above settings.
        bucket: 'some-specific-bucket',
        access: 'authenticated-read'
      },
      {
        // Wildcards are valid.
        src: 'documents/*.txt',

        // But if you use wildcards, make sure your destination is a directory.
        dest: 'documents/'
      }
    ],

    // Files to be downloaded.
    download: [
      {
        src: 'documents/important.txt',
        dest: 'important_document_download.txt'
      },
      {
        src: 'garbage/IGNORE.txt',
        dest: 'passwords_download.txt'
      }
    ]
  }

});

Running grunt s3 using the above config produces the following output:

$ grunt s3
Running "s3" task
>> ✓ Downloaded: documents/important.txt (e704f1f4bec2d17f09a0e08fecc6cada)
>> ✓ Downloaded: garbage/IGNORE.txt (04f7cb4c893b2700e4fa8787769508e8)
>> ✓ Uploaded: documents/document1.txt (04f7cb4c893b2700e4fa8787769508e8)
>> ✓ Uploaded: passwords.txt (04f7cb4c893b2700e4fa8787769508e8)
>> ✓ Uploaded: important_document.txt (e704f1f4bec2d17f09a0e08fecc6cada)
>> ✓ Uploaded: documents/document2.txt (04f7cb4c893b2700e4fa8787769508e8)

Done, without errors.

Keywords

FAQs

Package last updated on 14 May 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc