Updated Readme to include environment variables info
This commit is contained in:
parent
6f52084d7b
commit
ec4b9411a8
14
README.md
14
README.md
|
@ -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.
|
||||
|
|
Reference in New Issue