webel

0.5.0 • Public • Published

Deprecated

Rollup and Buble were awesome, no reason to maintain a project which has similar purpose but no more feature.

webel

Simple javascript bundler integrated webpack and babel.

Introduction

Webel is useful for a small project or testing some features. Webel also has watch mode to build application immediately for developing.

Installation

$ npm install --save-dev webel

Usage

The compiled result is written into memory-fs and has been piped to stdout in default, you can pipe the result into a file simply.

In normal mode, result will be piped to `stdout` but won't in watch mode, you can use option --output to export the result into a file. If you use --watch without --output, the result will just stored in memory, its works like a dynamic syntax corrector.

CLI

// Build an application
$ webel entry.js > bundle.js

// Watch an application
$ webel --watch entry.js -o bundle.js

NPM Script

// package.json
...
"scripts": {
  "build": "webel index.js -o dist/app.js",
  "watch": "webel index.js -wo dist/app.js"
},
...

Options

Usage Description Alias
--watch Start in watch mode -w
--output file Pipe result to the specified file -o
--minimize Minimize the result -m
--source-map Generate source map file, works only if -o has provided -s

Configuration

You can also provide a configuration file to webel for more customizable, just create an file named webel.config.js under your project directory.

Remember, configuration file only works if it is --dev installation.

babel.plugins and babel.presets will extends the default values.

externals allows Array and also Boolean value. (default: true) (externals === true ? nodeExternals() : [])

Quick look

// webel.config.js defaults
module.exports = {
  babel: {
    plugins: [
      'transform-async-to-generator',
      'transform-runtime'
    ],
    presets: [
      ['es2015', { modules: false }],
      'stage-2'
    ]
  },
  externals: [
    require('webpack-node-externals')()
  ],
  plugins: []
}

In used plugins

  • webpack.NoErrorsPlugin : When there are errors while compiling, skips the emitting phase.
  • progress-bar-webpack-plugin : For more friendly compiling messages.

Configuration examples

Readme

Keywords

none

Package Sidebar

Install

npm i webel

Weekly Downloads

0

Version

0.5.0

License

MIT

Last publish

Collaborators

  • shirohana