for a node package starting from scratch, if you have already node install globally then hit “npm init” and it will take you through series of question and then you can hit
npm publish –access public
to publish your public package
once its done create a GitHub repo and add repo url in your package.json file and push package to repo
{ "name": "@mae/ga_cid", "version": "1.0.1", "description": "google analytics client id", "main": "ga_cid.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "repository": { "type": "git", "url": "https://github.com/clicksco/Google-Analytics-Client-ID.git" }, "keywords": [ "google analytics", "google analytics client id", "mae" ], "author": "furqan <EMAIL ADDRESS>", "license": "ISC", "readme": "README.md", "dependencies": {} }
References:
https://docs.npmjs.com/developers
https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/