mean-duck
v1.0.4
Published
a mean duck that may or may not motivate you to become a better developer
Downloads
7
Readme
Mean Duck
HOW TO USE ( proceed with caution - the duck ain't friendly)
npm i mean-duck
const duck = require("mean-duck");
console.log(duck.help());
console.log(duck.greet());
console.log(duck.ask("question here"));
Demo of how to publish your own mini library to NPM Registry
Steps:
- create a git repo and
README.md
file - go to the project folder and run
npm init
- you can enter package name, version, description, entry point, keywords, author ... when being prompted
- create a
index.js
file and write the function to be exported
Once you are happy with your code, you can test it by doing:
Testing
- run
npm link
in the terminal ( of your project directory) - create another directory and run
npm link package-name
( this will install the package locally) - you can now test it by running
node mytest.js
// mytest.js file in another directory
const myStuff = require('my-package')
console.log(myStuff.somefunction())
Publishing
npm login
( you will need to create an account first)npm publish
Issue and solution
https://stackoverflow.com/questions/59280276/npm-package-readme-display-issue/61161811#61161811