diff --git a/README.md b/README.md index 4c941bd..2126c3e 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/other_usefull_stuff b/other_usefull_stuff new file mode 100644 index 0000000..2153b08 --- /dev/null +++ b/other_usefull_stuff @@ -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 + diff --git a/project_setup b/project_setup new file mode 100644 index 0000000..9cf8044 --- /dev/null +++ b/project_setup @@ -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