在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):joshukraine/middleman-gulp开源软件地址(OpenSource Url):https://github.com/joshukraine/middleman-gulp开源编程语言(OpenSource Language):Ruby 42.9%开源软件介绍(OpenSource Introduction):Middleman 4 + Gulp.jsThis is a Middleman template which implements Gulp.js using the new external pipeline feature introduced in Middleman 4. Features
RequirementsUsage
DeploymentI recommend Amazon S3 for deployment. It's very simple and surprisingly cost effective. Here's how to deploy your site to S3.
BONUS: If you deploy with Amazon, you can get a free ssl certificate for your site! EnvironmentsMiddleman has two default environments: Custom environments can be invoked on the command line with
Code for custom environments is stored in For completeness, all five environments used in this template have corresponding files: environments/
├── console.rb
├── development.rb
├── production.rb
├── staging.rb
└── test.rb Middleman vs. GulpAs I initially experimented with Gulp and Middleman, it was sometimes difficult to determine which tool should handle which tasks. The problem is that, while Gulp and Middleman are very different, they have a fair amount of overlapping functionality. For example, Middleman can minify your CSS and JavaScript right out of the box. So can Gulp. Middleman can also minify your HTML, gzip your files, and automatically reload your browser using LiveReload. And Gulp can do all these things too. So how do you decide who does what? I think most people would be inclined to have Gulp do it all. That's what it was designed for, and it makes sense to keep all these asset-related tasks in one place. However, since we're using Gulp inside of Middleman - a robust static site generator - I think there are some tasks that are better left to Middleman. Here's how I've broken it down in this template:
TestsTesting is done with Rspec. A few basic tests are provided as an example. Run your test suite like so:
AliasesConsider adding the following to your mm='bundle exec middleman'
mmb='bundle exec middleman build --clean'
mmc='bundle exec middleman console -e console'
mms='bundle exec middleman server' AcknowledgementsThe following repos were very helpful in setting up this template.
Reference
LicenseCopyright © 2018 Joshua Steele. MIT License |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论