gulp-rollup-file
Gulp wrapper around rollup-plugin-file
Last updated 3 years ago by bede .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-rollup-file 
SYNC missed versions from official npm registry.

Gulp Rollup File

Gulp wrapper around rollup-plugin-file, to allow passing a file (or vinyl) entry point to Rollup rather than a string.

Installation

npm install --save-dev gulp-rollup-file

Usage

This is mainly designed to be used alongside gulp-process-inline, so we can use Rollup on inline <script> blocks in HTML.

import gulp from 'gulp';
import rollup from 'gulp-rollup-file';
import processInline from 'gulp-process-inline';

gulp.task('inline-rollup', () => {
  return gulp.src('./src/*.html')
    .pipe(processInline().extract('script'))
    .pipe(rollup({ format: 'iife' }))
    .pipe(processInline().restore())
    .pipe(gulp.dest('./dist/'));
});

TODO

  • Add tests

License

MIT © Bede Overend

Current Tags

  • 0.1.5                                ...           latest (3 years ago)

6 Versions

  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (4)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |