Socket
Book a DemoInstallSign in
Socket

grunt-cloudfront-root

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-cloudfront-root

AWS CloudFront cache invalidating grunt task.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

grunt-cloudfront

Grunt task for updating the default root object in Amazon AWS CloudFront.

Basically a port of smysnk/gulp-cloudfront, with much borrowed code.

Get Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-cloudfront-root --save-dev

Then add this line to your project's Gruntfile.js gruntfile:

grunt.loadNpmTasks('grunt-cloudfront');

Usage

// Project configuration.
grunt.initConfig({
  cloudfront: {
    options: {
      region:'us-east-1', // your AWS region
      distributionId:"YOUR_DISTRIBUTION_ID", // DistributionID where files are stored
      credentials:grunt.file.readJSON('path/to/aws/credentials.json'), // !!Load them from a gitignored file
    },
    stage: {
      options: {
        distributionId: '** DEV KEY **',
        patternIndex: /^index\.[a-f0-9]{8}\.html(\.gz)*$/gi
      },
      cwd: '<%= yeoman.dist %>',
      src: '*.html'
    },
  }
});

AWS Credentials

You should store your AWS credentials outside of source control. They will be loaded from the following environment variables if available:

AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY

Or you can store them in a git ignored credential file which looks like this:

{
  "accessKeyId": "ACCESS_KEY",
  "secretAccessKey": "SECRET_ACCESS_KEY"
}

License

Licensed under the MIT license.

Keywords

gruntplugin

FAQs

Package last updated on 11 Nov 2015

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.