I have a directory structure like this:
+ src
|
| - modules
| |
| | - auth
| | |
| | | - auth.coffee
| | | - auth.sass
| | | - login.html
| | | - logout.html
| |
| | - navigation
| | |
| | | - navigation.coffee
| | | - navigation.sass
| | | - navbar.html
| |
| - scripts
| |
| | - vendor
| | |
| | | - underscore.js
| | | - angular.js
| |
| | - app.coffee
| | - router.coffee
|
| - styles
| |
| | - config.sass
| | - style.sass
I want to:
Watch all
.coffee
,.sass
and.html
files and do steps 2 and 3 when a file has changedCompile the
.coffee
and.sass
files.For both i need to specify dependencies (or: a specific ordering).
- Coffeescript
- compile
scripts/vendor/underscore.js
- then
scripts/vendor/angular.js
- then
scripts/*.js
- then
modules/**/*.js
- compile
- SASS
- compile
styles/config.sass
- then
styles/style.sass
- then
modules/**/*.sass
- compile
- Coffeescript
Collect all
.js
,.css
and.html
files and organize them for the public folder.
This is the desired output
+ public
|
| - partials
| |
| | - auth
| | |
| | | - login.html
| | | - logout.html
| |
| | - navigation
| | |
| | | - navbar.html
| |
| - scripts
| |
| | - app.js
|
| - styles
| |
| | - app.css
I tried many tools, but couldn't get the desired result. For example Flour for the Coffeescript had problems with wildcards in compile methods.
I think the best thing would be a Cakefile that does everything for me. How can i accomplish this?