{"id":1391,"date":"2018-11-09T14:59:20","date_gmt":"2018-11-09T13:59:20","guid":{"rendered":"http:\/\/blog.via-internet.de\/?p=1391"},"modified":"2018-11-09T14:59:20","modified_gmt":"2018-11-09T13:59:20","slug":"ionic-installation-on-unix","status":"publish","type":"post","link":"https:\/\/via-internet.de\/blog\/2018\/11\/09\/ionic-installation-on-unix\/","title":{"rendered":"Installation on Unix"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Prepare environment<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Install nvm and Node<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Change to users home and create users&#8217;s profile <strong>.bash_profile<\/strong> (if not exist)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd $HOME\ntouch .bash_profile<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Download nvm install script and run it.&nbsp;The installation script also modifies the users&#8217;s profile <strong>.bash_profile<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl -o- https:\/\/raw.githubusercontent.com\/creationix\/nvm\/v0.33.11\/install.sh | bash\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run users&#8217;s profile, so nvm will be installed. This ist done automatically after login.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">. .bash_profile<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Install latest Node LTS version<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># install latest version\nnvm install node --reinstall-packages-from=node\n\n# install a specific version\nnpm -install 8.12.0\n\n# set nvm aliases (used in direnv configuration)\nnvm alias latest 8.12.0\nnvm alias default 8.12.0\n\n# install additional packages\nnpm -g install ionic@latest\nnpm -g install capacitor@latest<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create Ionic sample Apps<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir -p daten\ncd daten\nionic start tabs tabs --type angular \u2014-no-link\nionic start sidemen sidemenu --type angular \u2014-no-link<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Install direnv<\/h2>\n\n\n\n<div class=\"wp-block-columns has-2-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Installation on mac OS. For more&nbsp; information read <a href=\"http:\/\/blog.via-internet.de\/blog\/2018\/01\/26\/build-separated-development-environments-with-direnv\/\">here\ufeff<\/a><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">brew install direnv<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Installation on Linux<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt-get update  &lt;br>\nsudo apt-get install direnv <\/pre>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Configfile for direnv<\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#!\/bin\/bash\n\n#-------------------------------------------------------------------------------\n\n\tSELF=$BASH_ARGV\n\tHERE=\"$(cd $(dirname \"$SELF\"); pwd)\"\n\tSELF=\"$(basename \"$SELF\")\"\n\n#-------------------------------------------------------------------------------\nPRINT()\n{\n\tGRP=\"$1\"; shift\n\tCMD=\"$1\"; shift\n\tPAR=\"$*\"\n\n        printf \"\n}\n\n#-------------------------------------------------------------------------------\n\tPRINT \"config\" \"$HERE\" \"$SELF\"\n\n\tPYTHON_VERSION=2.7.14\n\tNODE_VERSION=latest\n\n\texport NVM_DIR=\"$HERE\/.env\/nvm\"\n\n\tPRINT \"setup\" \"nvm\" \"$NVM_DIR\"\n\t. \/usr\/local\/opt\/nvm\/nvm.sh\n\n\tPRINT \"set latest\" \"nvm\" \"$NODE_VERSION\"\n        nvm use $NODE_VERSION --silent\n\n\tPRINT \"set latest\" \"pyenv\" \"$PYTHON_VERSION\"\n\tpyenv local $PYTHON_VERSION 2>&amp;-\n\n\tPRINT \"Enabled\" \"nvm\"      \"$(nvm      --version)\"\n\tPRINT \"Enabled\" \"node\"     \"$(node     --version | sed '1,$s\/v\/\/g')\"\n\tPRINT \"Enabled\" \"npm\"      \"$(npm      --version)\"\n\tPRINT \"Enabled\" \"python\"   \"$(python   --version 2>&amp;1)\"\n\tPRINT \"Enabled\" \"python2\"  \"$(python2  --version 2>&amp;1)\"<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">.bashrc<\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># setup direnv\neval \"$(direnv hook bash)\"<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Prepare environment Install nvm and Node Change to users home and create users&#8217;s profile .bash_profile (if not exist) Download nvm install script and run it.&nbsp;The installation script also modifies the users&#8217;s profile .bash_profile Run users&#8217;s profile, so nvm will be installed. This ist done automatically after login. Install latest Node LTS version Create Ionic sample Apps Install direnv Installation on mac OS. For more&nbsp; information read here\ufeff Installation on Linux Configfile for direnv .bashrc<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[98,35,49],"tags":[],"class_list":["post-1391","post","type-post","status-publish","format-standard","hentry","category-ionic","category-ionic-4","category-mobile-development"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/posts\/1391","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/comments?post=1391"}],"version-history":[{"count":0,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/posts\/1391\/revisions"}],"wp:attachment":[{"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/media?parent=1391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/categories?post=1391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/via-internet.de\/blog\/wp-json\/wp\/v2\/tags?post=1391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}