Foundation-for-Jekyll-sites / jekyll-foundation

Start your Jekyll (v3) project with Zurb Foundation for Sites (v6, sass).
MIT License
179 stars 64 forks source link

Add JEKYLL_ENV=production to Gulp's build task #42

Closed eksperimental closed 7 years ago

eksperimental commented 7 years ago

Fixes https://github.com/core77/jekyll-foundation/pull/40#issuecomment-264845968

core77 commented 7 years ago

I'm wondering in the jekyll config you check if the environment is 'development' (to ignore the compress.html layout).

In the jekyll gulp task you set 'production'.

Where ist the 'development' environment beeing set?

eksperimental commented 7 years ago

according to Jekyll documentation, 'development' is the default environment

eksperimental commented 7 years ago

another way of doing this is to define the ENV in package.json

  "scripts": {
    "start": "gulp",
    "build": "JEKYLL_ENV=production gulp build --production",
    "test": "JEKYLL_ENV=production gulp build --production"
  },

but doing it inside gulp allows us to call gulp directly

core77 commented 7 years ago

👍