[RFC] CLI flag to specify action to run after bundling finishes
See original GitHub issueAs @microcipcip pointed out, Parcel doesn’t have any easy way to run a script after bundling finishes. So if you want to call some script that further processes the bundled files after they get bundled, there’s no easy way to do that from the CLI if you are running parcel in watch mode.
Implementation seems pretty straightforward but I wanted to get some feedback from the community before going ahead and implementing it.
Some Questions / Discussion Points
- What should we call the CLI flag?
--postbundle?--then?- This actually looks pretty nice:
parcel entry.abc --then script.jsbut might not be intuitive to everyone
- This actually looks pretty nice:
- Anything else
- What should the command take as its input? Should it take a file name of a node script to execute, or should it take any arbitrary string containing some bash commands?
parcel entry.abc -x script.jsparcel entry.abc -x ‘node script.js’- Which allows you to use any command, like:
parcel entry.abc -x ‘python somescript.py’
- Which allows you to use any command, like:
So ya, would love to get feedback from you guys on what you think about this and any thoughts you guys have on the things above.
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (12 by maintainers)
Top Results From Across the Web
IEEE 802.3ad Link Bundling - Cisco
The IEEE 802.3ad Link Bundling feature provides a method of aggregating multiple Ethernet links into a single logical channel.
Read more >create-resource — AWS CLI 1.27.33 Command Reference
A key-value map specifying data schemas, represented by Model resources, (as the mapped value) of the request payloads of given content types (as...
Read more >RFC 3945: Generalized Multi-Protocol Label Switching ...
Since these concepts were introduced together with GMPLS and since they are ... in a Resv/Label Mapping (with the modification action indicator flag...
Read more >ArubaOS 8.3.0.x CLI Reference Guide - Aruba Networks
For any command that requires entry of an IP address to specify a network ... The following example describes the steps to use...
Read more >Services - GitLab Docs
When you configure CI/CD, you specify an image, which is used to create the container where your jobs will run. To specify this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just FYI.
I’ve been developing a server with Node and Typescript, and I needed to re-build the app and restart it on every file change.
That’s how I got here.
Anyway, I’ve solved it with Nodemon. Here’s how:
In other words, Nodemon watches
src/for changes intsfiles and runs a specified command on each change.Looks like we have consensus… there’s no real need for this feature at this point.
Sorry @microcipcip but I’m gonna close this issue, but let us know if you need help accomplishing this using the
Bundlerclass.