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

deno bundle piping #3254

Closed
timreichen opened this issue Nov 1, 2019 · 6 comments
Closed

deno bundle piping #3254

timreichen opened this issue Nov 1, 2019 · 6 comments

Comments

@timreichen
Copy link
Contributor

I wonder if it is possible to pipe the deno bundle <source_file> instead of writing it to a file.
If I pipe the output now it is information about the bundling process:

Bundling "mod.bundle.js"
Emitting bundle to "mod.bundle.js"
14.5 kB emitted.

I am experimenting and want to create a deno-loader for webpack so deno modules could be bundled for the client side (e.g. EventEmitter).

Any thoughts on that?

@ry
Copy link
Member

ry commented Nov 1, 2019

It would be possible to do with some hacks in cli/js/compiler.ts .. it seems like a reasonable feature to me.

@nayeemrmn
Copy link
Collaborator

nayeemrmn commented Nov 1, 2019

deno bundle mod.js /dev/stdout works.

I guess it's common to allow deno bundle mod.js - platform independently.

@nayeemrmn
Copy link
Collaborator

Also, I'm pretty sure that's a bug that it says

Bundling <out file>
Emitting bundle to <out file>

@timreichen
Copy link
Contributor Author

deno bundle mod.js /dev/stdout works.

I guess it's common to allow deno bundle mod.js - platform independently.

Yes but it also returns the information text and if -L debug is added all debug logs.

Wouldn't it make sense to make the bundle command return the bundled code if no argument for is passed. Or even deno bundle "https://somefile.ts" > bundle.ts to write it to a file.

Also I would consider adding a --eval -e flag to be able to bundle code without any <source_file>.

What are your thoughts on that?

@timreichen timreichen reopened this Nov 1, 2019
@nayeemrmn
Copy link
Collaborator

Oh, for some reason I thought the info was written to stderr.

@nayeemrmn
Copy link
Collaborator

This is implemented now, omit the output file argument. @ry This can be closed.

@ry ry closed this as completed Mar 15, 2020
mmastrac added a commit that referenced this issue Jul 31, 2023
Includes a lightly-modified version of hyper-util's `TokioIo` utility. 

Hyper changes:

v1.0.0-rc.4 (2023-07-10)
Bug Fixes

    http1:
http1 server graceful shutdown fix (#3261)
([f4b51300](hyperium/hyper@f4b5130))
send error on Incoming body when connection errors (#3256)
([52f19259](hyperium/hyper@52f1925),
closes hyperium/hyper#3253)
properly end chunked bodies when it was known to be empty (#3254)
([fec64cf0](hyperium/hyper@fec64cf),
closes hyperium/hyper#3252)

Features

client: Make clients able to use non-Send executor (#3184)
([d977f209](hyperium/hyper@d977f20),
closes hyperium/hyper#3017)
    rt:
replace IO traits with hyper::rt ones (#3230)
([f9f65b7a](hyperium/hyper@f9f65b7),
closes hyperium/hyper#3110)
add downcast on Sleep trait (#3125)
([d92d3917](hyperium/hyper@d92d391),
closes hyperium/hyper#3027)
service: change Service::call to take &self (#3223)
([d894439e](hyperium/hyper@d894439),
closes hyperium/hyper#3040)

Breaking Changes

Any IO transport type provided must not implement hyper::rt::{Read,
Write} instead of tokio::io traits. You can grab a helper type from
hyper-util to wrap Tokio types, or implement the traits yourself, if
it's a custom type.
([f9f65b7a](hyperium/hyper@f9f65b7))
client::conn::http2 types now use another generic for an Executor. Code
that names Connection needs to include the additional generic parameter.
([d977f209](hyperium/hyper@d977f20))
The Service::call function no longer takes a mutable reference to self.
The FnMut trait bound on the service::util::service_fn function and the
trait bound on the impl for the ServiceFn struct were changed from FnMut
to Fn.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants