Updated Readme to include environment variables info

This commit is contained in:
atomtigerzoo 2017-08-10 16:34:17 +02:00
parent 6f52084d7b
commit ec4b9411a8
1 changed files with 14 additions and 0 deletions

View File

@ -67,6 +67,20 @@ You can use ES6 and use both relative imports or import libraries from npm.
Any CSS file directly under the `src/css/` folder will get compiled with [PostCSS Next](http://cssnext.io/)
to `/dist/css/{filename}.css`. Import statements will be resolved as part of the build
## Environment variables
Two seperate the development and production *- aka build -* stages, all gulp
tasks run with a node environment variable named either `development` or
`production`.
You can access the environment variable inside the theme files with
`getenv "NODE_ENV"`. See the following example for a conditional statement:
{{ if eq (getenv "NODE_ENV") "development" }}You're in development!{{ end }}
All tasks starting with *build* set the environment variable to `production` -
the other will set it to `development`.
## Deploying to netlify
- Push your clone to your own GitHub repository.