Metalsmith plugin for invalidating Amazon CloudFront distributions
JavaScript Makefile
Latest commit 8baebfd Oct 27, 2016 @carlnordenfelt committed on GitHub Update CHANGELOG.md
Permalink
Failed to load latest commit information.
lib
tests/unit v0.0.3 Callback returns files Oct 27, 2016
.editorconfig
.gitignore first version Aug 27, 2016
CHANGELOG.md Update CHANGELOG.md Oct 27, 2016
LICENSE
Makefile
README.md added link to CF docs Aug 28, 2016
package.json v0.0.3 Callback returns files Oct 27, 2016

README.md

metalsmith-cloudfront

Metalsmith plugin for invalidating files in Amazon CloudFront cache. To be used in conjunction with metalsmith-s3.

Details on CloudFront cache invalidation: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html Note: Invalidating the CloudFront cache can take a few minutes.

Installation

$ npm install metalsmith-cloudfront

Parameters

  • dist: CloudFront Distribution ID
  • paths: Array of paths to invalidate. All paths must start with /.

Usage

var Metalsmith = require('metalsmith');
var s3 = require('metalsmith-s3');
var cloudfront = require('metalsmith-cloudfront');

var metalsmith = new Metalsmith(__dirname)
  .use(s3({
    action: 'write',
    bucket: 's3-bucket-dest'
  }))
  .use(cloudfront({
      dist: 'cloudFrontDisributionId',
      paths: [
        '/*'
      ]
  }))

License

The MIT License (MIT)

Change Log

Change Log