crisper icon indicating copy to clipboard operation
crisper copied to clipboard

scripts with type="text/ecmascript-6" are not extracted

Open bushuyev opened this issue 9 years ago • 7 comments

Putting type="text/ecmascript-6" in script tag like this:

results in ouput file containing original

bushuyev avatar Jan 22 '16 08:01 bushuyev

Where you found this mime-type? links to spec https://tools.ietf.org/html/rfc4329 and thoughts http://www.2ality.com/2011/08/javascript-media-type.html Also i found this https://github.com/wojtkowiak/crisper/commit/1d787960397076eba9a1050e5edfc9be7ca6179e

arturparkhisenko avatar Jan 25 '16 14:01 arturparkhisenko

In Intellij idea: https://intellij-support.jetbrains.com/hc/en-us/community/posts/207086715-Javascript-formatting-inside-html

bushuyev avatar Jan 25 '16 14:01 bushuyev

I think standard-only will be type="module", not type="text/babel" or type="text/ecmascript-6" or type="es6" or even some kind of jsx. And their fix in intellij-idea is just another bundler/handler/tool, it's not real spec mime-type, because we can set it to type="text/coffeescript" or type="text/jsx". So we must just wait their decision ;) I'd prefer to stay with standard and dont blow it with all other types.

Maybe we have an analog in NPM packages of this module outside from Polymer? where we can find this functionality (i'm really looking a module which can extract css + js.. not only js like crisper does).

arturparkhisenko avatar Jan 25 '16 14:01 arturparkhisenko

well, anyway it's all workaround, hopefully, temporary. So nobody would be hurt much by blowing it with any sorts of types.

bushuyev avatar Jan 25 '16 15:01 bushuyev

@bushuyev to make it faster, you can make pull like in commit linked before and maybe they accept it)

arturparkhisenko avatar Jan 25 '16 15:01 arturparkhisenko

My pull request was already merged here: https://github.com/PolymerLabs/crisper/commit/3e043d560797fdd6fecfae6ee1052aa8d43d5f5f Somebody just need to bump the version I guess.

wojtkowiak avatar Jan 25 '16 19:01 wojtkowiak

@wojtkowiak :+1: thanks!

arturparkhisenko avatar Jan 25 '16 20:01 arturparkhisenko