Closed antitoxic closed 12 years ago
An alternative to this would be to give a new argument to render_*
, which would make it return the path to the relevant file, rather than the whole <script>
/<link>
tag.
This would offer the same power as your proposal, but would allow Casset to minify the relevant file if the user didn't have a pre-minified copy available.
What do you think?
render_*
with an extra parameter will be nice! It does the job :)
Take a look at the feature/gen_tags_option branch, see if it does what you want.
I had a read throught the README.
Thank you!
Cool, it's been merged into develop.
Currently
Casset::get_filepath_js
accepts only a string which represents the relative filepath to the current asset path. This makes all environments to include either minified or non-minified.It would be a useful addition to be able to call:
where Casset will decide depending on environment which script path to return.
This is also applies to all
get_filepath_*
methods.