Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: node_js
node_js:
- '4'
- '6'
- '7'
- '8'
- '10'
- '12'
- '14'
before_script:
- npm install -g gulp
script: gulp ci
15 changes: 6 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
'use strict';

var gulp = require('gulp-help')(require('gulp'));
var gulp = require('gulp');
var jasmine = require('gulp-jasmine');
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var seq = require('gulp-sequence');

require('gulp-release-tasks')(gulp);

gulp.task('test', function () {
return gulp.src(['test/**/*.spec.js'])
.pipe(jasmine({
reporter: new SpecReporter()
}));
.pipe(jasmine({
reporter: new SpecReporter()
}));
});

gulp.task('jscs', function() {
Expand All @@ -30,6 +27,6 @@ gulp.task('jshint', function() {
.pipe(jshint.reporter('fail'));
});

gulp.task('lint', seq('jshint', 'jscs'));
gulp.task('lint', gulp.series('jshint', 'jscs'));

gulp.task('ci', seq('lint', 'test'));
gulp.task('ci', gulp.series('lint', 'test'));
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function GulpRollup(options) {
self.emit('bundle', bundle, entryFile);

if (unifiedCachedModules) {
var modules = bundle.modules;
var modules = bundle.cache.modules;
for (var i = 0; i < modules.length; ++i) {
var module = modules[i], id = module.id;
if (Object.prototype.hasOwnProperty.call(unifiedCachedModules, id)) {
Expand All @@ -186,6 +186,7 @@ function GulpRollup(options) {

return bundle.generate(options);
}).then(function(result) {
const outputFile = result.output[0];
// get the corresponding entry Vinyl file to output with.
// this makes file.history work. maybe expando properties too if you use them.
var file = vinylSystem.resolveId(entryFile);
Expand All @@ -195,13 +196,13 @@ function GulpRollup(options) {
if (file === undefined) { // possible if options.allowRealFiles is true
file = new File({
path: entryFile,
contents: bufferFrom(result.code)
contents: bufferFrom(outputFile.code)
});
} else {
file.contents = bufferFrom(result.code);
file.contents = bufferFrom(outputFile.code);
}

var map = result.map;
var map = outputFile.map;
if (map) {
// This makes sure the paths in the generated source map (file and
// sources) are relative to file.base:
Expand Down
Loading