4 ms·
You should have RequireJS compile them on-the-fly in the browser like the CoffeeScript plugin (https://github.com/requirejs/require-cs https://github.com/requir
by cmwelsh 13y ago
You should have RequireJS compile them on-the-fly in the browser like the CoffeeScript plugin (https://github.com/requirejs/require-cs https://github.com/requirejs/require-cs) and the Handlebars plugin (https://github.com/SlexAxton/require-handlebars-plugin https://github.com/SlexAxton/require-handlebars-plugin).
That way a separate Python script isn't required.
- pheelicks 13y agoNice 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?
- bhouston 13y agoTo make things easy during the development of http://Clara.io 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.
- cmwelsh 13y agoRequireJS 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.