gulp-query-rollup
Rollup with a single line of code
Last updated 10 months ago by nurieff .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-query-rollup 
SYNC missed versions from official npm registry.

gulp-query-rollup

Webpack plugin for gulp-query

Uses rollup-plugin-buble, rollup-plugin-uglify with uglify-es, rollup-plugin-node-resolve and rollup-plugin-commonjs

Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library or application

npm install gulp-query gulp-query-rollup

Example

Paste the code into your gulpfile.js and configure it

let build = require('gulp-query')
  , rollup = require('gulp-query-rollup')
;
build((query) => {
    query.plugins([rollup])
      // Create module App
      .rollup('src/js/app.js','js/','app')
    
      // Rename and create module Undercover
      .rollup('src/js/admin.js','js/undercover.js')
    
      // Config as object
      .rollup({
        from: 'src/js/main.js',
        to: 'js/',
        name: 'main',
        moduleName: 'Main'
      })
    ;
});

And feel the freedom

gulp
gulp --production // For production
gulp watch // Watching change
gulp rollup // Only for webpack
gulp rollup:app // Only for app.js
gulp rollup:admin rollup:main watch // Watching change only for admin.js (admin/**/*) and main.js (main/**/*)
...

Options

.rollup({
    name: "task_name", // For gulp rollup:task_name 
    moduleName: "moduleName", // Rollup is a module bundler 
    format: "iife", // Default: iife -- amd, cjs, es, umd 
    from: "src/js/app.js",
    to: "js/", // set filename "js/concat.js" -- for rename
    source_map: true,
    source_map_type: 'inline',
    full: false // if set true is without compress in prod
})

Current Tags

  • 1.1.1                                ...           latest (10 months ago)

3 Versions

  • 1.1.1                                ...           10 months ago
  • 1.1.0                                ...           10 months ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (9)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |