jetheredge / SquishIt

Lets you *easily* bundle some css and javascript! Check out the Google group if you have questions!
http://groups.google.com/group/squishit
MIT License
459 stars 119 forks source link

Writing the script directly from the program #65

Closed Lisaj closed 13 years ago

Lisaj commented 13 years ago

It would be nice if it were possible to write scripts directly from the application and not just add the path to them.

AlexCuse commented 13 years ago

I'm not sure I'm following this one. Do you mean taking strings of CSS / Javascript from an arbitrary source, combining/compressing and then rendering directly into the page?

Lisaj commented 13 years ago

Yes. Have a management tool for static and dynamic javascrits. For example, one bundle for static javascript and one bundle for dynamic javascrit.

AlexCuse commented 13 years ago

I'm not sure this really fits in with what SquishIt is trying to accomplish. I'm sure you could use one of the various supported minifiers directly to accomplish this without much difficulty though.

Lisaj commented 13 years ago

SquishIt is contained in everything. It would be enough to handle the files as an interface that could implement the extension and not work with files as a string. Interface to define operations such as reading, hash and the last change. It would be the better option for extensibility.

AlexCuse commented 13 years ago

My concern is that adding things like this would end up cluttering the exposed interface for what seems like a very rare use case. If you look around in BundleBase and Asset classes (paying special attention to everywhere that asset.IsEmbeddedResource gets checked) you should be able to implement this in your fork pretty easily.