Create npm packages

We have created a package for our OS @npmjs.com Getting Started with Gitlist OS $npm install gitlist

download the package via npm

$ npm install gitlist

To Create a Package

Go to your Folder which the App is Created:

Open it with the Terminal ls your App. Create your package.json file.

$npm run build

Going back to your Folder cd

$ vi package.json

Include your Node Tree like Name of the package, the Version etc.

{
  "name": "gitlist",
  "version": "1.0.7",
  "description": "Gitlist OS",
  "keywords": [],
  "dependencies": {
    "bcrypt": "~0.8.0",
    "ejs": "~0.8.4",
    "grunt": "0.4.2",
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-coffee": "~0.10.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-copy": "~0.5.0",
    "grunt-contrib-cssmin": "~0.9.0",
    "grunt-contrib-jst": "~0.6.0",
    "grunt-contrib-less": "0.11.1",
    "grunt-contrib-uglify": "~0.4.0",
    "grunt-contrib-watch": "~0.5.3",
    "grunt-sails-linker": "~0.9.5",
    "grunt-sync": "~0.0.4",
    "include-all": "~0.1.3",
    "nodemailer": "~1.4.0",
    "passport": "~0.2.1",
    "passport-github": "^0.1.5",
    "passport-local": "~1.0.0",
    "passport-twitter": "~1.0.2",
    "password-generator": "^0.2.3",
    "rc": "~0.5.0",
    "sails": "~0.11.0-rc10",
    "sails-disk": "~0.10.0",
    "sails-hook-autoreload": "^0.11.4",
    "sails-mongo": "^0.12.0",
    "shortid": "~2.1.3",
    "tilda": "^4.2.1"
  },
  "scripts": {
    "start": "node app.js",
    "debug": "node debug app.js"
  },
  "main": "app.js",
  "repository": {
    "type": "git",
    "url": "git://github.com/SpaceG/gitlist.io.git"
  },
  "author": "lucasgatsas",
  "license": "BSD-2-Clause",
  "bugs": {
    "url": "https://github.com/SpaceG/gitlist.io/issues"
  },
  "homepage": "https://github.com/SpaceG/gitlist.io#readme"
}

after you want to publish your package: going back to your Terminal

prompt the Terminal

$ npm adduser

Password: 
Email: (this IS public) npm.demo.user@gmail.com

....

wait a Moment

prompt after this Commandline

npm config ls do you will see your informationa which one do you have submited to your $ npm adduser

going to the Webiste of Npmjs.com like :

https://www.npmjs.com/~spaceg

Right now, your are fix to publishing your package! with the Commandline

$ npm publish

do you will see the Version Number of the App which do you have included to the package.json file !

cyberspace$ npm publish
+ gitlist@1.0.6

Now, do you can chec your npm package to see if it published and to see its possible to download…

press to see your package & to download. $ npm install yourpackage name mine also: $npm install gitlist

you can test it with the commandline to see the Message from the Console like : node test.js

i have created a index.js file in the root of the Folder of the App.

and put in this export Message :

exports.printMsg = function() {

	console.log("Thanks using npm install gitlist");
}

dyou can see the Version patch with the Commandline

$ npm version patch it give the Output of the Version Informations.

Thats it! Have fun with the Modern npm packages !

See the Current Install Video:

Current Work Flow : gitlist V.1.0.2 - Testing App - Notify me of follow-up comments & posts by email.

Gitlist OS Source

$ git clone https://github.com/SpaceG/gitlist.io.git

$ sudo sails lift

$ npm install

$ npm install sails-mongo --save

first remove the node_module folder, then install npm packages $npm install then after, $ sudo sails lift , do you will see, it give a error back, becuase do you haven’t install MongoDB packages.. install Mongo DB : via commandline in the same dictory which you launch the full app : run npm install sails-mongo --save then it will intsall all MongoDB Packages : then run again $ sudo sails lift .

Clone The Master Branch to your Desktop: Clone Gitlist Master

Read the Full Documentation here on my Github : Gitlist Documentation

If you find a Bug or Update the Source give a Note about a Issue : Gitlist OpenSource Issues

Big dedicated to my Friends Stellardrone:

“If you are going to walk on thin ice, you might as well dance”