Comments (5)
Hey Ben,
Thanks again for checking out express-coffee, I will be glad to add back the Cakefile and add some documentation on how to use either approach.
Thanks
Tom
from express-coffee.
Thanks Tom. I find your "server.js" (which loads app.coffee directly) very useful as an example of how to develop using .coffee files directly (without need to recompile, yet also without need to run node via "coffee" or "nodemon" binary). But I also find the Cakefile useful as an example of how to compile to .js. Compiling is useful for deployment, obviously. But it's also useful just for debugging and running tests. Ultimately I'd want my tests to be running against the compiled js, so if a test generates an error, I can find the exact line number where it blew up. And so as to be sure I'm testing something as close as possible to what gets deployed.
from express-coffee.
Hey Ben,
I agree, I have been working on a Cakefile that starts the server, and watches for changes and rebuilds the application.
I think it is an interesting idea, to have a Cakefile that does all three separately or within one common command:
ex
#> Compile Source
cake complile
#> Run Server
cake server
#> Run Test
cake test
#> All Three
cake run
That way everyone could use the workflow they prefer. The cool thing about the the cake run, is when a file changes it could restart the server and re-run the tests automatically.
If you think this is a good idea, I will work it into the project.
from express-coffee.
That makes sense. One other option that can be useful during development is to run nodemon, which if you provide a .nodemonignore file can be set to restart the server anytime a change occurs, even to the .coffee files (so you don't even need to compile). nodemon can evaluate coffee files directly or could process server.js. FYI there's an issue with coffee's "watch" option such that it doesn't work effectively if the files get edited via Textmate. There's a ticket already open on it, apparently it's a problem with how the "fs" library works. Since I develop with Textmate, that's currently making me opt for things like nodemon where I can bypass the issue of "coffee -w".
One last thought, just brainstorming, but if the Cakefile tasks were namespaced, that'd make it easier to copy them into other projects' Cakefiles, making them more portable. There's a dearth of good examples of Cakefile tasks out there.
from express-coffee.
Added Cakefile back in 1.4 with watch and supervisor, so in dev mode you can run:
cake dev
But in production deploy with no coffee-script dependencies
from express-coffee.
Related Issues (20)
- tests not passing on master HOT 6
- all.css no longer in S3 HOT 1
- non-matching bootstrap file versions
- Express Coffee is set to compile stylus at every request on production HOT 1
- Include bootstrap and jquery using bower HOT 1
- Mongoose default settings fail on Heroku HOT 2
- What abwt using brunch.io? HOT 1
- incompatible versions during NPM install HOT 1
- launch with error HOT 1
- Actively maintained bootstrap-stylus repo HOT 2
- Concurrent connections only one HOT 2
- Some ideas? HOT 4
- Add Yo generator HOT 3
- Upgrade to Express 4 (any takers?) HOT 7
- error in `cake dev` related to piping
- Mocha runs tests twice
- running slower than pure expressjs
- i wanna to know how to debug coffeescript
- npm-shrinkwrap?
- Travis CI integration?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from express-coffee.