![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@andarist/rollup-stream
Advanced tools
a wrapper around Rollup that returns a stream instead of a Promise
This is a simple wrapper around Rollup that returns a readable stream instead of a Promise, like Browserify's bundle() method. It's designed to make using Rollup with gulp easier, but if you find another use for it, go ahead!
The options object is passed to Rollup's rollup() and generate() methods. This currently works because there's no overlap between the names of the options those methods take. Hopefully that won't change any time soon!
npm install --save-dev rollup-stream
var gulp = require('gulp'),
rollup = require('rollup-stream'),
source = require('vinyl-source-stream');
gulp.task('rollup', function() {
return rollup({
input: './src/main.js'
})
// give the file the name you want to output with.
.pipe(source('app.js'))
// and output to ./dist/app.js as normal.
.pipe(gulp.dest('./dist'));
});
var gulp = require('gulp'),
rollup = require('rollup-stream'),
sourcemaps = require('gulp-sourcemaps'),
// rename = require('gulp-rename'),
source = require('vinyl-source-stream'),
buffer = require('vinyl-buffer');
gulp.task('rollup', function() {
return rollup({
input: './src/main.js',
sourcemap: true
})
// point to the entry file.
.pipe(source('main.js', './src'))
// buffer the output. most gulp plugins, including gulp-sourcemaps, don't support streams.
.pipe(buffer())
// tell gulp-sourcemaps to load the inline sourcemap produced by rollup-stream.
.pipe(sourcemaps.init({loadMaps: true}))
// transform the code further here.
// if you want to output with a different name from the input file, use gulp-rename here.
// .pipe(rename('index.js'))
// write the sourcemap alongside the output file.
.pipe(sourcemaps.write('.'))
// and output to ./dist/main.js as normal.
.pipe(gulp.dest('./dist'));
});
var gulp = require('gulp'),
rollup = require('rollup-stream'),
source = require('vinyl-source-stream');
var cache;
gulp.task('rollup', function() {
return rollup({
input: './src/main.js',
cache: cache
})
.on('bundle', function(bundle) {
cache = bundle;
})
// after listening for the 'bundle' event, proceed as usual.
.pipe(source('app.js'))
.pipe(gulp.dest('./dist'));
});
gulp.task('watch', function() {
gulp.watch('./src/**/*.js', ['rollup']);
});
var gulp = require('gulp'),
rollup = require('rollup-stream'),
source = require('vinyl-source-stream');
gulp.task('rollup', function() {
return rollup({
input: './src/main.js',
rollup: require('rollup')
})
// after passing options.rollup, proceed as usual.
.pipe(source('app.js'))
.pipe(gulp.dest('./dist'));
});
var gulp = require('gulp'),
rollup = require('rollup-stream'),
source = require('vinyl-source-stream');
gulp.task('rollup', function() {
return rollup('rollup.config.js')
.pipe(source('app.js'))
.pipe(gulp.dest('./dist'));
});
FAQs
a wrapper around Rollup that returns a stream instead of a Promise
The npm package @andarist/rollup-stream receives a total of 1 weekly downloads. As such, @andarist/rollup-stream popularity was classified as not popular.
We found that @andarist/rollup-stream 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.