Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncompressed input #28

Open
lifthrasiir opened this issue Sep 25, 2021 · 0 comments
Open

Uncompressed input #28

lifthrasiir opened this issue Sep 25, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lifthrasiir
Copy link
Owner

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.

@lifthrasiir lifthrasiir added the enhancement New feature or request label Sep 25, 2021
@lifthrasiir lifthrasiir added this to the 2.2.0 milestone Sep 25, 2021
@lifthrasiir lifthrasiir self-assigned this Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant