Skip to content

julienw/gobble-devnull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

gobble-devnull

This plugin is extremely simple: it will gobble (I don't have a better word, sorry !) your input node. That means this input node won't contribute to the final build.

This is especially useful for linters and tests. Indeed you don't want your test files to clutter your final build, yet you want to run them and so they must be part of your build at one moment.

Here is an example:

const gobble = require('gobble');

const tests =
  gobble([
    gobble('src').moveTo('src'),
    gobble('test').moveTo('test')
  ])
  .observe('eslint')
  .transform('devnull');

module.exports = gobble([
  tests,
  gobble('src/root'),
  gobble([
    gobble('src/js'),
    gobble('src/libs'),
    gobble('src/jade').transform('jade-es6')
  ])
  .transform('babel')
  .transform('webpack', {
    entry: './entry.js',
    sourceMap: true
  })
]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published