JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q35114F
  • License MIT

webpack-ing, run webpack or webpack-dev-server with pickable custom configure. Help you to manage many of multiple verbose web configs through a custom config file

Package Exports

  • webpacking

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webpacking) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

webpacking Build Status

webpack-ing, run webpack or webpack-dev-server with pickable custom configure

Help you to manage many of multiple verbose web configs through a custom config file

Install

$ npm install --save webpacking

Usage

var webpacking = require('webpacking');

webpacking('compile', './fixtures/webpack.config.js', {
    configs: [
        'app',
        'modules'
    ]
}).then(function (err) {
    done();
});

API

webpacking(runner, configs, [options])

runner

Type: string

webpack runner type what you want to run.

  • compile: bundle by webpack
  • server: run server with webpack-dev-server

configs

Type: string

path for custom webpack configure file. see below sample and tests for more information.

'use strict';
var path = require('path');
var webpack = require('webpack');

module.exports = {
    modules: {
        module: {
            loaders: [{
                test: /\.jsx?$/,
                exclude: /node_modules/,
                loaders: ['babel-loader']
            }, {
                test: /\.coffee$/,
                exclude: /node_modules/,
                loader: 'coffee-loader'
            }, {
                test: /\.cjsx$/,
                exclude: /node_modules/,
                loaders: ['coffee', 'cjsx']
            }]
        }
    },
    app: {
        entry: path.resolve(__dirname, 'app.coffee'),
        output: {
            path: path.resolve(__dirname, 'dist'),
            publicPath: 'dist/',
            filename: 'app.js',
        }
        ...
    },
    server: {
        entry: path.resolve(__dirname, 'app.coffee'),
        output: {
            path: path.resolve(__dirname, 'dist'),
            publicPath: 'dist/',
            filename: 'app.js'
        }
        ...
    }
};

options

configs

the names of configures you want to set up for webpack

CLI

$ npm install --global webpacking
$ webpacking --help

Usage
webpacking [runner] [input] [options]

Options
--configs: the names of configures. should be passed with `,` and no-space

Examples
    $ webpacking compile ./webpack.config.js --configs=modules,app
    $ webpacking server ./webpack.config.js --configs=modules,server

License

MIT © ragingwind