Olli / guard-webpack

Guard plugin for Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Guard::Webpack Gem Version

Guard::Webpack spins up a Webpack watcher in a background thread.

Installation

Please ensure you have Guard installed before you continue.

Add the following to your application's Gemfile:

group :development do
  gem 'guard-webpack'
end

And then execute:

$ bundle

Add Guard::Webpack to your Guardfile by running:

$ guard init webpack

Usage

Please refer to the Guard usage doc

Example Guardfile

At present, Guard::Webpack assumes you already have Webpack configured via a webpack.config.js file. Please refer to this Webpack tutorial for help getting that configured.

You can, however, add additional options to your Guardfile, as seen below:

guard :webpack, colors: false, config: './config/webpack/development.config.js'

Options

List of available options

d: false                 # development mode turns on debug mode, source maps, and path info, default: false
colors: true             # use colors in displaying webpack output, default: true
progress: true           # display a progress bar for long compiles, default: true
config: 'path_to_config' # define an alternate config file
mode: 'production'       # set up optimizations accordingly. More information on the webpack docs: https://webpack.js.org/configuration/mode/. default: production

Notes on Guard 1.x

Guard::Webpack strives to support older versions of Guard (including the Guard::Guard, rather than Guard::Plugin syntax. However, support may be limited. Options, as specified above, are not supported for versions of Guard below 2.0.

Contributing

  1. Fork it ( https://github.com/gisikw/guard-webpack/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Guard plugin for Webpack

License:MIT License


Languages

Language:Ruby 100.0%