How to use the gulp-awspublish.reporter function in gulp-awspublish

To help you get started, we’ve selected a few gulp-awspublish examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github productboard / webpack-deploy / tasks / deploy-s3.js View on Github external
gulp
      .src(config.assetsPath)
      .pipe(
        rename(function(filepath) {
          filepath.dirname = path.join(config.dirname, filepath.dirname);
        }),
      )
      // gzip, Set Content-Encoding headers and add .gz extension
      .pipe(gulpIf(file => !file.path.match(/\.(mp4|ogg|webm|avi|mov|mkv)$/), aws.gzip()))
      // publisher will add Content-Length, Content-Type and headers specified above
      // If not specified it will set x-amz-acl to public-read by default
      .pipe(publisher.publish(headers))
      // create a cache file to speed up consecutive uploads
      .pipe(publisher.cache())
      // print upload updates to console
      .pipe(aws.reporter())
  );
}
github auth0-samples / auth0-sso-dashboard / gulpfile / app.js View on Github external
// define custom headers
    var headers = {
      'Cache-Control': 'max-age=315360000, no-transform, public'
    };

    var revAll = new RevAll({
      dontRenameFile: ['\.woff', '\.woff2', '\.svg', '\.ttf', '\.eot']
    });

    return gulp.src('./dist/app/**/*.*')
      .pipe(revAll.revision())
      .pipe(awspublish.gzip())
      .pipe(publisher.publish(headers))
      .pipe(publisher.cache())
      .pipe(awspublish.reporter())
      .pipe(cloudfront(aws));
  });
github DallasMorningNews / generator-dmninteractives / generators / page / templates / gulp / tasks / aws.js View on Github external
question: deline`You're about to publish this project to AWS
                            under the directory '${awsDirectory}'.
                            In the process, we'll also wipe out any
                            uploads to the test directory.
                            Are you sure you want to do this?`,
          input: '_key:y',
        }))
        .pipe(rename((filePath) => {
          // eslint-disable-next-line no-param-reassign
          filePath.dirname = awsDirectory + filePath.dirname.replace('.\\', '');
        }))
        .pipe(awspublishRouter(routes))
        .pipe(publisher.publish({}, { force: false }))
        .pipe(cloudfront(cfSettings))
        .pipe(publisher.cache())
        .pipe(awspublish.reporter())
        .on(
          'end',
          gutil.log.bind(
            gutil,
            // eslint-disable-next-line comma-dangle
            `Published at 'http://interactives.dallasnews.com/${awsDirectory}'.`
          )  // eslint-disable-line comma-dangle
        );
github michaelBenin / react-ssr-spa / gulpfile.babel.js / tasks / gulp_upload_static_files.js View on Github external
};

  return gulp
    .src([
      `./dist/static/js/${manifestJSON['vendor.js']}`,
      `./dist/static/js/${manifestJSON['vendor.js.map']}`
    ])
    .pipe(
      rename(function renamePlugin(path) {
        path.dirname = `/${vendor}/${path.dirname}`; // eslint-disable-line no-param-reassign
        return path;
      })
    )
    .pipe(awspublish.gzip())
    .pipe(publisher.publish(headers))
    .pipe(awspublish.reporter());
});
github latestchatty / chatty / src / gulp / tasks / publish.js View on Github external
gulp.task('publish', function() {
    var awsconfig = require('../../../aws-credentials')
    var publisher = awspublish.create(awsconfig)

    return gulp.src(config.publishPaths)
        .pipe(publisher.publish({}))
        .pipe(publisher.cache())
        .pipe(awspublish.reporter())
})
github IzumiSy / chat-frontend / gulpfile.js View on Github external
dotenv.config();

  var publisher = s3.create({
    region: process.env.AWS_REGION,
    params: {
      Bucket: process.env.AWS_BUCKET
    },
    accessKeyId: process.env.AWS_KEY,
    secretAccessKey: process.env.AWS_SECRET
  });

  return gulp.src(`${dest}/**/*`)
    .pipe(publisher.publish({}, { noAcl: true }))
    .pipe(publisher.cache())
    .pipe(publisher.sync())
    .pipe(s3.reporter());
});
github nbcnews / machinist / bin / gulp-tasks / publish-assets.js View on Github external
secretAccessKey: awsConfig.secretAccessKey,
      httpOptions: { timeout: 300000 }
    })

    const gzipFilter = filter(['cdnassets/**/*.{txt,csv,json,js,css}'], {restore: true})

    return gulp.src('cdnassets/**/*.{jpg,png,gif,mp3,ogg,flac,mp4,mov,avi,webm,zip,rar,webp,txt,csv,json,pdf}')
      .pipe(rename(function (path) {
        path.dirname = `/cdnassets/projects/${initDate.year}/${initDate.month}/${config.projectSlug}/${path.dirname}`
      }))
      .pipe(gzipFilter)
      .pipe(awspublish.gzip())
      .pipe(gzipFilter.restore)
      .pipe(publisherAssets.publish({}, {simulate: SIM, createOnly: true}))
      .pipe(publisherAssets.cache())
      .pipe(awspublish.reporter(''))
      .on('finish', function () {
        log.ok(`Published to: http://s3-${awsConfig.region}.amazonaws.com/${awsConfig.bucketName}/cdnassets/projects/`)
      })
  }
}
github keen / keen-js / gulpfile.js View on Github external
.pipe(aws.gzip())
    .pipe(publisher.publish(jsHeaders, { force: true }))
    .pipe(publisher.cache())
    .pipe(aws.reporter());

  return gulp.src([
      './dist/keen.css',
      './dist/keen.min.css'
    ])
    .pipe(rename(function(path) {
      path.dirname += '/' + pkg['version'];
    }))
    .pipe(aws.gzip())
    .pipe(publisher.publish(cssHeaders, { force: true }))
    .pipe(publisher.cache())
    .pipe(aws.reporter());

});
github timezoneio / timezoneio / gulpfile.js View on Github external
gulp.task('upload-images', function() {
  var publisher = awspublish.create(getAWSConfig());
  return gulp.src(['public/images/**/*'])
    .pipe(rename(function (path) {
      path.dirname = 'images/' + path.dirname;
    }))
    .pipe(publisher.publish(s3Headers))
    .pipe(publisher.cache())
    .pipe(awspublish.reporter());
});

gulp-awspublish

gulp plugin to publish files to amazon s3

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis