The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Moving scripts into their own packages
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
But how can do I expose them in the
serialport package if I move them?
What do you mean by “expose”?
npx @serialport/term not work for you?
I guess I want them to ship in SerialPort too so people who just upgrade can still run it.
Then add the packages as dependencies. Then they can call
npx @serialport/term and it will execute them without needing to download.
I guess this will have to be a breaking change.
You could write a thing wrapper script which imports the library from the command package and runs that …