Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.07 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.07 KB

gulp-rollbar NPM version

Install

$ npm install gulp-rollbar --save-dev

Requirements

Following Gulp's philosophy, gulp-rollbar does not generate any the source map, but delegates this task to gulp-sourcemaps. Just make sure you call sourcemaps.init() in the pipeline before rollbar().

Usage

var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');
var rollbar = require('gulp-rollbar');

gulp.task('javascript', function() {
  gulp.src('src/**/*.js')
    .pipe(sourcemaps.init())
    .pipe(plugin1())
    .pipe(plugin2())
    .pipe(rollbar({
      accessToken: '31415926535897932384626433832795',
      version: 'c7519b7848a7016f94900be178afbef9bc6f103b',
      sourceMappingURLPrefix: 'https://example.com'
    }))
    .pipe(gulp.dest('dist'));
});