jescalan / roots

a toolkit for rapid advanced front-end development
http://roots.netlify.com/
Other
1.45k stars 133 forks source link

[V 3.1.0] problems setting the output variable in app.production.coffee #663

Closed ganar closed 9 years ago

ganar commented 9 years ago

I have a file named app.production.coffee that sets the place were I want roots to build my production files for the project.

My variable output is set like this:

output       = '../../www/ia'

but even though on executing roots compile -e production it seems to be doing something, and no error is thrown, the corresponding directory is empty.

I also tried doing

output       = 'ia'

With the same result. What do you suggest I do in this case?

jescalan commented 9 years ago

In app.coffee, module.exports is an object. Therefore, you must use the key/value syntax as in other objects, not assigning of a variable.

Changing this to output: '../../www/ia will work. I just tested this with a fresh project :grinning:

Example:

module.exports =
  output: '../../www/ia`
  # all other stuff
ganar commented 9 years ago

@jenius Jeff: thanks a lot for your help. Please consider linking together the article on roots configuration and environments or give a more complete example at the end of environment. The documentation is not very clear for us noobs.

jescalan commented 9 years ago

No problem! Would you be willing to contribute these changes to the documentation? I'm not sure I understand exactly what clarifications you are after, so I'm sure you'd do a better job than me!

https://github.com/carrot/roots-www