I have a unique directory structure that I need help making a build script for.
Here is the link (slightly different) or directory structure:
client
/extensions
/sandbox
/widgets
/form
/collections
/models
/views
/styles
custom.css
/controllers
main.coffee
server
/views
/layouts
/errors
app.coffee
config.coffee
Couple things I need:
- Compile coffeescript with a watch task into a server-dist + client-dist
- Copy over all other files into their nested folders, preferably with a watch task also
Problems:
- If I just compile coffeescript it just copies over the .coffee files to .js into their nested directories but that leaves behind .css / imgs / etc loaded with require.js. I need a way to bring them as well into the -dist directories
- Main.coffee in the /client folder is a require.config and can be used with requirejs grunt build tool to optimize things.
Anyways the easiest solution is what I am looking for.
I ended up using grunt - with the following tasks:
Here is the grunt file in its current iteration: