You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Roadroller gives you a JS code which decompresses into the original input when run. Normally you then have to put it into the template that is not compressed; this is trivial in the API but not in the CLI, so we need CLI options to prepend and append arbitrary uncompressed data to the output. Depending on the design there may be several options.
-t asis: Any input with this type would be printed as is, with implied -a write. This fits well with multiple inputs (Multiple inputs #8) but there is a possible ambiguity. For example -t asis one.html -t js a.js -t asis two.html -t js b.js -t asis three.html suggests that a.js and b.js is separated with two.html, but this might not be desirable or even impossible depending on the implementation.
-t before|after: These options ensure the uncompressed input to go either before or after the compressed data. I'm not sure how to handle multiple of them though.
-B|--before and -A|--after: Similar to the previous but it is a bit clearer because they are technically not inputs but output transformations (the CLI has an implicit convention that lowercased options are related to inputs and uppercased options are related to outputs).
-T|--template: "Before"/"after" inputs would be related, so a single option might be more appropriate. It is also free from multiple uncompressed inputs (we can simply forbid multiple -T options). A mark where the compressed JS goes should be chosen however.
Also unlike most compressed inputs, uncompressed inputs can be as short as <script> and </script> so ideally it should be possible to give them directly from the command line.
The text was updated successfully, but these errors were encountered:
Currently Roadroller gives you a JS code which decompresses into the original input when run. Normally you then have to put it into the template that is not compressed; this is trivial in the API but not in the CLI, so we need CLI options to prepend and append arbitrary uncompressed data to the output. Depending on the design there may be several options.
-t asis
: Any input with this type would be printed as is, with implied-a write
. This fits well with multiple inputs (Multiple inputs #8) but there is a possible ambiguity. For example-t asis one.html -t js a.js -t asis two.html -t js b.js -t asis three.html
suggests thata.js
andb.js
is separated withtwo.html
, but this might not be desirable or even impossible depending on the implementation.-t before|after
: These options ensure the uncompressed input to go either before or after the compressed data. I'm not sure how to handle multiple of them though.-B|--before
and-A|--after
: Similar to the previous but it is a bit clearer because they are technically not inputs but output transformations (the CLI has an implicit convention that lowercased options are related to inputs and uppercased options are related to outputs).-T|--template
: "Before"/"after" inputs would be related, so a single option might be more appropriate. It is also free from multiple uncompressed inputs (we can simply forbid multiple-T
options). A mark where the compressed JS goes should be chosen however.Also unlike most compressed inputs, uncompressed inputs can be as short as
<script>
and</script>
so ideally it should be possible to give them directly from the command line.The text was updated successfully, but these errors were encountered: