Skip to content
This repository has been archived by the owner on Nov 25, 2018. It is now read-only.

Latest commit

 

History

History
68 lines (39 loc) · 2.68 KB

README.md

File metadata and controls

68 lines (39 loc) · 2.68 KB

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.