2021年1月4日星期一

What is the best way to develop your own npx scripts?

I am trying to develop my own NPX script to download and unpack a Github repo in a conventient way for the developer (similar to what npx create-react-app does).

Simple NPX script examples placed in Github gists or repos seems to work fine. But whenever I start with filesystem manipulation I seem to run into all kinds of errors, while the same .js-script works well in a local repo.

Also, there seem to be some kind of cache present, as changes to my Github repo are ignored by the NPX command. Clearning the cache with npm cache clean does not make any difference.

So I guess my question is, what is the most rigid way of developing and testing your own npx scripts that are to be used by others?

https://stackoverflow.com/questions/65572280/what-is-the-best-way-to-develop-your-own-npx-scripts January 05, 2021 at 10:06AM

没有评论:

发表评论