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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept stdin #3189

bfred-it opened this issue Jul 3, 2019 · 2 comments


None yet
3 participants
Copy link

commented Jul 3, 2019

馃檵 Feature request

cat 'require("foo")("foo this")' | parcel-bundler build -

Like browserify does, accept stdin as if it was a file in the current directory (for the module resolution cwd)

馃 Expected Behavior

Exactly like this:

cat 'require("foo")("foo this")' > index.js && parcel-bundler build index.js

馃敠 Context

This would let me create easy bundles without having to go through files that have to be deleted and/or gitignored.

馃捇 Examples

echo 'console.log("Hello!");' | browserify - 

This comment has been minimized.

Copy link

commented Jul 8, 2019

How would parcel know in this example that you passed Javascript and not HTML or CSS? With a --stdin-type flag?


This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

That's a good point. I see three options:

  • only accept one type, e.g. JS
  • do content detection
  • add filename/extension flag, like echo 'true' | parcel build --stdin js

Probably only the last one is sane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.