Middleman::NpmBuild
Runs a generic npm
build command before your Middleman site starts building.
Installation
Add this line to your Middleman app's Gemfile
:
gem 'middleman-npm_build'
And then execute:
$ bundle install
Usage
Add this line to your config.rb
:
activate :npm_build
This will run npm run build
before your Middleman site starts building.
You can also pass a custom build function (defined in your package.json
file) as below:
activate :npm_build, build_command: 'custom_build_function'
Contributing
- Fork it ( https://github.com/jhixson/middleman-npm_build/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request