Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a great idea for deployment; I really want someone to write something that helps with development.

Example: I'm using Coffeescript/Closure/whatever as well as LESS/SASS/Stylus as well as some javascript package system. Whenever I change any of those files, I want the appropriate compiler to get run. I might want to then cat all of the output files into a single big file (e.g. main.css). Now I can edit-refresh in peace.

But now I'm done developing, I want to test and deploy. Now I really want that minification. Perhaps I want require.js's optimzation binary to run. Anything that wasn't cat'ed together should get cat'ed now.

Sure, you can make this two separate tools, but I'd rather have just one.



I wrote a tool along those lines: http://github.com/mwylde/slinky.

It runs a static file server that transparently compiles resources as they are requested (so you request main.js and it finds main.coffee, compiles it, and sends it back).

Then when you're ready to deploy, it's one command to compile/concatenate/minify your css and javascript.

Right now it only supports Coffescript, SASS and HAML, but adding additional compilers is really simple.


So, basically, "make"? ;)

The problem with pretty much all build/deploy tools is that they are "just one". There are different tasks, and they _should_ be split.

* Monitoring a filesystem for changes. * Traversing a dependency graph, and computing the minimal set of tasks from there * Execute arbitrary user actions for each task. (For bonus points, allow a feedback channel from actions to DAG) * For extra bonus points, monitor your actions on the OS level to update the DAG automatically. It's neat gcc can create a list of includes. It'd be much neater if I automatically could get a list of dependencies for any tool I run.

Making them into one monolithic tool means inevitably there are some cases the tool is less-than-useful.


There's a built-in "watch" task, along with an open issue to further refine and document it. It's works very well so far, in that a developer can edit arbitrary files and have them all re-linted, unit tested, concatenated, etc as soon as they are saved.

And you could easily have a set of "dev" watch tasks configured, along with "deploy" tasks for minification, etc. There's a lot there, and if you want more just file an issue and we can see what makes sense to implement.


That's what http://brunch.io/ exactly is for.


There is already a tool which has all the features you need to help web developers: http://code.google.com/p/wro4j/wiki/Features

It can be used during development, as a runtime or buildtime solution. Also it can be used as a command line tool. It supports almost all known processors (less, sass, coffee, etc) and allows static code analysis with jshint, jslint or csslint.


At our studio we use Eclipse and you can add build preferences when saving a file. We built our own bash/shell scrips and just set them to run every time we save which compiles and minifies our script on the spot.

You could easily create a script that ran "node myfile.js" every time you saved.


Middleman will probably do most of what you want although not exactly how you describe: http://middlemanapp.com/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: