0.1.6 • Published 8 years ago

opener-for-webpack v0.1.6

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

opener-for-webpack

A simple plugin to open the app in browser after compiling the code by webpack

Installation

npm install -D opener-for-webpack

Usage

    const OpenerForWebpack = require('opener-for-webpack');
    module.exports = {
      entry: "./app.js",
      output: {
      },
      plugins: [
        new OpenerForWebpack({url: 'http://localhost:8090'})
      ]
    };

With webpack-multi-configurator plugin with angularity

var angularity = require('webpack-angularity-solution');
var opener     = require('opener-for-webpack');

const PORT = '3000';

module.exports = angularity(process.env, {port: PORT})
  .append(openTheApp)
  .otherwise('app+test')
  .resolve();


function openTheApp(configurator, options) {
  var url = 'http://localhost' + (options.port ? ':' + options.port : '');
  return configurator
    .plugin('opener-for-webpack', opener, [{url: url}]);
}

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago