Hacker News new | past | comments | ask | show | jobs | submit login

You should have RequireJS compile them on-the-fly in the browser like the CoffeeScript plugin (https://github.com/requirejs/require-cs) and the Handlebars plugin (https://github.com/SlexAxton/require-handlebars-plugin).

That way a separate Python script isn't required.




Nice suggestion - I agree it would be more elegant if I didn't need to invoke Python. I haven't been using Require.js for that long, so wasn't aware of the plugin functionality.

However, in the future I think it'd be nice if I could also have the GLSL code linted/compiled or minified, and this is probably out of the scope of what a Require.js plugin could do. Or am I wrong?


To make things easy during the development of http://Clara.io we wrote our own creation scripts that do all the processing of dependencies automatically.

Basically track which files are dirty and what other files are dependent upon their results (like a MAKE file) and then execute the various rules you have setup. This can work both in the context of a database where the files are all provided by the user, or it can work like MAKE does on a local file system.

GruntJS does this as does Jake with local file systems.


RequireJS basically assumes your code will compile correctly/free of errors. Linting or other activities besides straight up "successful compilation" are a bit outside the scope of a RequireJS plugin.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: