Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic project setup, install nodeJS: any Unix guide, text editor, nodeschool.io TIP #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 15 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,37 +46,19 @@ Open up terminal (Windows + R -> 'cmd' -> Enter) and type `node -v`. If it works
* `sudo apt-get install nvm`
* `nvm install 5.1`

### Install Node with nvm on any Unix(Linux, Mac...)
Node version manager (best practice): you can switch between Node version

curl https://raw.githubusercontent.com/creationix/nvm/v5.0.0/install.sh | bash #grab version 4
source ~/.profile # to get system aware of nvm - include nvm in $PATH = so you can use 'nvm' command in terminal
nvm ls # if you get error install git
apt-get install git, dnf/yum install git ....
# install any node version you want
nvm install v5.0.0
nvm install v5.1.0
node --version # node you're currently using
nvm use v 5.0.0 # changes node version only in current terminal tab
nvm alias default v5.0.0 # now this version is set as system default
so if you do not set it expclicitely v5 is set as default but you can override it - but only in terminal tab where you type "nvm use vX.y...."
elswhere (where you do not set it expclicitely - v5.0.0 would be used

##### Mac OS X

Navigate your browser to the [nodejs.org](https://nodejs.org). Download your Node.js installation package by clicking on of the big green buttons (we recommend the LTS variant):

![Download page](assets/mac-os-installation/01.jpg)

Run downloaded file:

![Download page](assets/mac-os-installation/02.jpg)

Go through the installation process, provide your password when asked:

![Download page](assets/mac-os-installation/03.jpg)

Your node is installed at this point, but we recommend some *"fininshing touches"*:

- set the ownership of global module folder

`sudo chown -R YOUR_USER_NAME /usr/local/lib/node_modules`

replace `YOUR_USER_NAME` in above command by your actual username in macosx. If you don't know your username, run `whoami` to get it printed into console.

- update to latest NPM

`npm update -g`

Now you can test your node.js & npm installation:

`node -v`

`npm -v`

![Download page](assets/mac-os-installation/04.jpg)
16 changes: 16 additions & 0 deletions other_usefull_stuff
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
npm install eslint -g # linter - checkuje sytnax(uplny zaklad each projektu)- potom treba plugin v txt editore pre eslint, aby "vedeli o sebe"
eslint config # konfiguruje eslint pozrite si navody (how to configure eslint) ale stacia defaulty, okrem JSX a react moznosti,
#iba ak chcete pouzivat reactJS
# -g znamena ze nainstaluje globalne (odporuca sa iba pre veci ako napr lintre, nejake command line tools...
#inak je to antipattern - niektore package globalne ani nepojdu nainstalovat

# ostatna odporucana literatura:
https://rogerdudler.github.io/git-guide/ #git guide

#package.json - resp ( ten file sa tvori pri npm init -da sa editovat aj manualne):
#http://browsenpm.org/package.json

#https://docs.npmjs.com/files/package.json
# a este samotny textovy editor: najskor asi atom (od githubu)
# http://info.meteor.com/blog/how-to-set-up-atom-and-webstorm-for-meteor-es6-es2015-and-jsx - configure eslint s atomom

16 changes: 16 additions & 0 deletions project_setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
npm init # inicializuje node projekt
npm install --save-dev eslint -g # linter checkuje sytnax(uplny zaklad each projektu)- potom treba plugin v txt editore pre eslint, aby "vedeli o sebe"
eslint config # konfiguruje eslint pozrite si navody (how to configure eslint) ale stacia defaulty, okrem JSX a react moznosti,
#yes iba ak chcete pouzivat reactJS
#potom mozte pridavat dalsie package a zacat kodit :)
#napr:
npm install --save react@^0.14.0
# rozdiel medzi --save --save-dev : --save-dev to su iba developers dependencie teda bez nich projekt bude ficat in production
#len su potrebne pre developovanie - napr eslint, nejake tooly ...
# ostatna odporucana literatura:
https://rogerdudler.github.io/git-guide/ #git guide
#package.json - resp ( ten file sa tvori pri npm init -da sa editovat aj manualne):
#http://browsenpm.org/package.json
#https://docs.npmjs.com/files/package.json
# a este samotny textovy editor: najskor asi atom (od githubu)
# http://info.meteor.com/blog/how-to-set-up-atom-and-webstorm-for-meteor-es6-es2015-and-jsx - configure eslint s atomom