A middleman v4 preconfigured to use the external pipeline with just webpack v2. Some helpful stuff is already integrated.
- middleman 4
- webpack 2
- BrowserSync - no manual page reloads ;-)
- Boostrap 4 - to start your frontend fast
- Font Awesome 4.7.0 - to have those nice icons present
- jQuery
- Rspec - prepared to test your static site - lol.
(optional). Create yourself a .ruby-version and .ruby-gemset-file to not mess up your environment. I'd recommend to use rbenv to manage that environment. This has been tested with ruby version 2.3.3 and a gemset named middleman-webpack.
-
gem install middleman -
Start a new middleman-project using
$ middleman init my_new_site -T toadle/middleman-webpack
2b. middleman will run bundle install for you. So wait.
3. Run npm install. Wait.
4. Run middleman s.
5. You should be able to open the page at http://localhost:3000.
6. You can create a production-build by running middleman build.
7. Run tests by rake or rspec.
- Uses
middleman's external pipeline to generate assets. Configuration is in the twoenvironment-filesdevelopment.rbandproduction.rb - Runs
webpackas it's external pipeline, as configured inpackage.json. webpackuses the thewebpack.config.jsas it's configuration.- When run as
middleman sindevelopmentit'll startmiddleman,middleman-livereload,webpackand BrowserSync. So reloading of templates and JS/CSS-changes should be reflected without manual reloads. - BrowserSync is configured to proxy the middleman-server from
localhost:4567tolocalhost:3000to inject itself. - Stuff
webpackdoes is put into.webpack_buildwhichmiddlemanserves together with it's own files.
