Moving scripts into their own packages

(Francis Gulotta) #1

I have a few serialport cli scripts and I want to break them out into scoped @serialport/packages but I’d like to somehow bring them into the package I’m splitting them out of.



All exist in the serialport package. I did figure out I could move them to


And then this will work

npx @serialport/term

But how can do I expose them in the serialport package if I move them?

(Markus Tacker) #2

What do you mean by “expose”?

Why does npx @serialport/term not work for you?

(Francis Gulotta) #3

I guess I want them to ship in SerialPort too so people who just upgrade can still run it.

(Markus Tacker) #4

Then add the packages as dependencies. Then they can call npx @serialport/term and it will execute them without needing to download.

(Francis Gulotta) #5

I guess this will have to be a breaking change. :thinking:

(Markus Tacker) #6

You could write a thing wrapper script which imports the library from the command package and runs that …

(system) #7

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.