scalableminds / amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
MIT License
162 stars 29 forks source link

Support for require plugins #4

Open normanrz opened 10 years ago

normanrz commented 10 years ago

e.g. text

Log Time

Tarabyte commented 10 years ago

Any chances to see this feature soon? :) Cool plugin by the way. Thanks for sharing your work.

normanrz commented 10 years ago

I don't have any schedule for this, and it is quite a chunk of work. What kind of requireJS plugins are you using?

Tarabyte commented 10 years ago

"it is quite a chunk of work" it looks like it is. All plugins heavily rely on r.js infrastructure. Basically I am using text and tpl to load html strings and templates. And was actually planning to use i18n for globalization.

atesgoral commented 10 years ago

What kind of requireJS plugins are you using?

The text plugin is a staple for loading HTML templates in a single page application. We're also using the require-less plugin.

The lack of support for loader plugins is the only thing that's stopping us from switching to amd-optimize right now :(

Awesome, noble effort! I wish I'd have the time to chip in with adding support for loader plugins.

engyii commented 10 years ago

+1 for text plugin. I think it's the main one...

anarchodin commented 9 years ago

Do the plugins generally depend on stuff beyond the documented 'loader plugin API'? I can see that being a fair bit of work to implement, but a comment here above makes me wonder if it goes beyond that. Are there any specific stumbling blocks in the way, aside from the amount of work involved?

normanrz commented 9 years ago

I suppose it's mainly the documented plugin loader API and regular node APIs (which are available of course).

kirill-konshin commented 9 years ago

+1 for text plugin. At least this one. Even as a dirty hack or whatever :) just make it work.

kirill-konshin commented 9 years ago

I have tried to use loader config property, but text!... files even don't appear in callbacks...

kirill-konshin commented 9 years ago

I've added PR which solves at least a part of this issue: https://github.com/scalableminds/amd-optimize/pull/31 Brute-force implementation of requirejs-text plugin

normanrz commented 9 years ago

Thanks to @kirill-konshin for making the text loader!