Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
gulp-s3-index
Advanced tools
Updates the Website Index of a S3 Bucket
Amazon S3 let's you use buckets as a Static Website Host. This allows you to visit your bucket as if it were a normal website. In the release process with gulp-awspublish and gulp-rev-all the index document has a hash. This plugin makes it possible to update the index document from your bucket, like gulp-cloudfront does it for cloudfront.
This plugin will identify the index.html file based on the default or configured pattern. Once identified it will update the S3 bucket with the new index file.
Install with npm
npm install --save-dev gulp-s3-index
var gulp = require('gulp');
var revall = require('gulp-rev-all');
var awspublish = require('gulp-awspublish');
var s3_index = require("gulp-s3-index");
var aws = {
"key": "AKIAI3Z7CUAFHG53DMJA",
"secret": "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",
"bucket": "bucket-name",
"region": "us-standard"
};
var publisher = awspublish.create(aws);
var headers = {'Cache-Control': 'max-age=315360000, no-transform, public'};
gulp.task('default', function () {
gulp.src('dist/**')
.pipe(revall())
.pipe(awspublish.gzip())
.pipe(publisher.publish(headers))
.pipe(publisher.cache())
.pipe(awspublish.reporter())
.pipe(s3_index(aws));
});
Type: Regular Expression
Default: /^\/index\.[a-f0-9]{8}\.html(\.gz)*$/gi
Specify the pattern used to match the default index file
var aws = {
..,
"patternIndex": /^\/root\-[a-f0-9]{4}\.html(\.gz)*$/gi
};
FAQs
> Updates the Website Index of a S3 Bucket
The npm package gulp-s3-index receives a total of 1 weekly downloads. As such, gulp-s3-index popularity was classified as not popular.
We found that gulp-s3-index demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.