sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 346 forks source link

How to access var in harp.json #613

Closed madeinffm closed 4 years ago

madeinffm commented 7 years ago

Hey there,

I'm fiddling around with base paths. Idea is to have a variable in harp.json called "root_url", which contains the path.

When using the Harp Server I would like to set it to "/". When in production mode, I'd like to use the one I set in harp.json.

How do I get the variable root_url from the global harp.json into that equation?

`if environment == "development"

"- var root_url = #{root_url}" throws an error, also when I get rid of this line completely. Any tips?

Thanks! florian