pachy

0.1.0 • Public • Published

pachy

A simpler Webpack CLI

Travis npm

Pachy is a CLI for people who want to use Webpack to do basic, boring things. Give it an entry file and an output file and it does the Webpack thing, with Babel. That's it and that's all.

Eventually you'll be able to add more loaders with command line flags.

Installation

npm install pachy

Usage

const pachy = require('pachy');
 
// Paths are relative to the CWD, unless an absolute path is given
const webpack = pachy('src/input.js', 'build/output.js');
 
// Run once
webpack.run(() => console.log('Done compiling.'));
 
// Watch for changes
webpack.watch(() => console.log('Bundle updated.'));

API

pachy(input, output)

Generates a Webpack instance based on the given entry file (input) and path to output file (output). babel-loader is enabled with babel-preset-env.

For more info on the object returned, see the Webpack documentation on its Node.js API.

CLI

  Usage
    $ pachy <input> <output>

  Options
    -w, --watch  Watch files for changes

  Examples
    $ pachy index.js bundle.js

Local Development

git clone https://github.com/gakimball/pachy
cd pachy
npm install
npm test

License

MIT © Geoff Kimball

Readme

Keywords

Package Sidebar

Install

npm i pachy

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • gakimball