webpack-blocks-bows

0.2.0 • Public • Published

webpack-blocks-bows

Generated with nod NPM version Build Status Coverage Status

A webpack block that injects bows (a console.log replacement) into source files.

This package uses bows-loader under the hood.

Install

$ yarn add -D webpack-blocks-bows

Or with npm:

$ npm install --save-dev webpack-blocks-bows

Usage

const { createConfig } = require('@webpack-blocks/webpack2');
const babel = require('@webpack-blocks/babel6');
const bows = require('webpack-blocks-bows');
 
const config = createConfig([
  babel(),
  bows(),
]);

Then, you can use the global log(...) in place of console.log(...).

Checkout the bows documentation for more details.

.eslintrc changes

Since you'll be using a new global in your source, eslint should complain about this. Either add log as a global, or use eslint-config-bows-loader.

API

bows

Returns a webpack block that injects bows global log(...) function.

Parameters

Returns Function

Exclude

Type: (string | RegExp | Array<string> | Array<RegExp>)

Options

Type: {exclude: Exclude?}

Properties

License

MIT © Orther Mulelid-Tynes Technologies, Inc.

Package Sidebar

Install

npm i webpack-blocks-bows

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • orther