Skip to content

Instantly share code, notes, and snippets.

@terary
Last active January 1, 2019 12:22
Show Gist options
  • Save terary/62cfb461cd85f1eb431601a27e545778 to your computer and use it in GitHub Desktop.
Save terary/62cfb461cd85f1eb431601a27e545778 to your computer and use it in GitHub Desktop.
New Node Project
#inspired by:
#https://www.wolfe.id.au/2014/02/01/getting-a-new-node-project-started-with-npm/
# Thank you Mark Wolfe
>>>make foreign repository '[project name].git'
$ mkdir [project name]
$ cd [project name]
$ git init
$ git remote add origin ssh://user@server:port/dir/to/[project name].git # (from 'make foreign repo')
$ wget https://gist.githubusercontent.com/terary/6f54a250f08d68c59bd33e781a8e7614/raw/4554fa9364705139be4b0603104da4b53301f2bb/Make
$ wget https://gist.githubusercontent.com/terary/a80fae05748a6368f76f2917d24d7401/raw/352afc04d59f538b491a6d4bed1926bf62b0d26a/.gitignore
$ wget https://gist.githubusercontent.com/terary/f3d19a3b1559a95f60ebafa11c9d1aee/raw/b38944c5a8cdb79a68ee644d215b26fa105fc39f/.jsdoc.json
$ make skel
[copy document template]
[copy build-docs.sh]
$ npm init
$ git add .
$ git commit -a 'Initial release'
$ git push origin master
# good idea to test repo by cloning into so temporary directory.
########### Make foreign repository on vps
create dir to house repository (hint should be in form: [project name].git <-- '.git' name convention for repo dirs
$ cd [project name]
$ git init
$ git config --bool core.bare true # <--** This is very important if creating empty repo on foreing machine
new repo name is ssh://user@server:port/dir/to/[project name].git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment