Keeping longer scripts (and multi line scripts) outside of package.js and other places that uses --print
What is the feature you are proposing to solve the problem?
Have bun --print use the data that is piped in as the js source if no parameter has been provided
cat '2+3' | bun --print
5
What alternatives have you considered?
If you generate the JS content you want to run you can store that in a file instead of piping it and call bun run x.js - while also adding console.log() around the last statement.
What is the problem this feature would solve?
Keeping longer scripts (and multi line scripts) outside of package.js and other places that uses
--print
What is the feature you are proposing to solve the problem?
Have
bun --print
use the data that is piped in as the js source if no parameter has been providedWhat alternatives have you considered?
If you generate the JS content you want to run you can store that in a file instead of piping it and call
bun run x.js
- while also adding console.log() around the last statement.