Thursday 26 September 2019

Making a CLI tool and publishing it to NPM registry

Hello,I'm trying to publish my CLI tool to NPM registry so other people can use it. It should work like how any CLI program works where when I type the command, the program will run. I set my command to "djs" and when I run it on my system after doing "npm link" it works fine. However, on other systems it doesn't seem to work. My friend installed my package by doing npm install discordjs-cli and it said "djs" command not found when he tried to use it. I've spent some time googling stuff yesterday and could only find articles to people building a CLI tool, but not deploying it for others to use. Anyone know how I can set it up so others can use it without having to configure anything? This is the repository for my project: https://github.com/ansonfoong/djs-cli-tool

Submitted September 27, 2019 at 03:15AM by ansonplusc

No comments:

Post a Comment