{"id":3550,"date":"2014-06-17T21:22:39","date_gmt":"2014-06-17T19:22:39","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=3550"},"modified":"2023-08-20T14:55:14","modified_gmt":"2023-08-20T12:55:14","slug":"wie-kann-grunt-via-npm-und-node-js-auf-osx-10-9-mavericks-mit-port-installiert-werden","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=3550","title":{"rendered":"Wie kann grunt via npm und node.js auf  OSX 10.9 Mavericks mit Port installiert werden?"},"content":{"rendered":"<p>Wer den Taskrunner Grunt installieren will, um vieles zu automatisieren, muss nur node.js und npm installieren. Also hier eine Anleitung in 3 Schritten: <\/p>\n<h3>Node.js<\/h3>\n<p>Wer eine Serverseitige Plattform zum Betrieb von Netzwerkanwendungen wie Webserver ben\u00f6tigt, ist bei Node.js richtig. Mit Node.js kann man mit ein paar Zeilen JavaScript einen Webserver schreiben.<\/p>\n<p>Es gibt mehrere Methoden <a href=\"https:\/\/nodejs.org\/en\" title=\"node.js\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/nodejs.org\/<\/a> zu installieren. \u00dcber <a href=\"https:\/\/nodejs.org\/download\/\" title=\"download\" target=\"_blank\" rel=\"noopener noreferrer\">download<\/a> oder auch \u00fcber <a href=\"https:\/\/ports.macports.org\/search\/?q=nodejs&amp;name=on\" title=\"port\" target=\"_blank\" rel=\"noopener noreferrer\">Port<\/a>.<\/p>\n<p>Die Installation \u00fcber Port, ist in ein paar Minuten erledigt, einfach<\/p>\n<p><code>sudo port install nodejs<\/code><\/p>\n<p>auf der Konsole eingeben.<\/p>\n<p>Dann &#8230;<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.37.33.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.37.33.png\" alt=\"Bildschirmfoto 2014-06-17 um 19.37.33\" width=\"1669\" height=\"254\" class=\"aligncenter size-full wp-image-3551\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.37.33.png 1669w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.37.33-300x45.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.37.33-1024x155.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.37.33-900x136.png 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a>&#8230; nach ein paar Sekunden.<\/p>\n<p>Checken ob node l\u00e4uft, mit Eingabe eines kleinen JavaScript Testprogramms mit <code>node<\/code> auf der Konsole:<br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.40.38.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.40.38.png\" alt=\"Bildschirmfoto 2014-06-17 um 19.40.38\" width=\"366\" height=\"110\" class=\"aligncenter size-full wp-image-3552\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.40.38.png 366w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-19.40.38-300x90.png 300w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/a><\/p>\n<p>Hier ein \u00dcberblick zu Node.js in einer Mindmap:<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Node.js.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Node.js.png\" alt=\"Node.js\" width=\"1053\" height=\"698\" class=\"aligncenter size-full wp-image-3558\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Node.js.png 1053w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Node.js-300x198.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Node.js-1024x678.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Node.js-900x596.png 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<h3>NPM<\/h3>\n<p>Dann installieren wir noch den <a href=\"https:\/\/www.npmjs.com\/\" title=\"npm\" target=\"_blank\" rel=\"noopener noreferrer\">Paketmanager npm<\/a> mit<\/p>\n<p><code>sudo port install npm<\/code><\/p>\n<p>damit wir Zugriff auf derzeit 78 819 Pakete haben.<\/p>\n<p>Checken ob alles richtig installiert wurde geht mit:<\/p>\n<p><code>npm -version<\/code><\/p>\n<p>bei mir wird nun die Version 1.4.14 ausgegeben.<\/p>\n<p>Oder mit <code>npm search grunt-cli<\/code> nach grunt-cli suchen. Der erste Aufruf dauert etwas, da noch ein Index erstellt wird. Dann wird aber ungef\u00e4hr so was ausgegeben:<br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.14.21.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.14.21.png\" alt=\"Bildschirmfoto 2014-06-17 um 20.14.21\" width=\"1612\" height=\"135\" class=\"aligncenter size-full wp-image-3555\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.14.21.png 1612w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.14.21-300x25.png 300w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.14.21-1024x85.png 1024w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.14.21-900x75.png 900w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><\/p>\n<h3>Grunt<\/h3>\n<p>Jetzt noch <a href=\"https:\/\/gruntjs.com\/getting-started\" title=\"grunt\" target=\"_blank\" rel=\"noopener noreferrer\">Grunt<\/a> installieren.<br \/>\nDas k\u00f6nnen wir mit dem npm wie folgt ausf\u00fchren:<\/p>\n<p><code><br \/>\nsudo npm install -g grunt-cli<br \/>\nsudo npm install -g grunt-init<br \/>\nsudo npm install grunt --save-dev<br \/>\nsudo npm install easyimage<br \/>\nsudo npm upgrade<br \/>\n<\/code><br \/>\nErgebnis:<br \/>\n<a href=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.18.05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.18.05.png\" alt=\"Bildschirmfoto 2014-06-17 um 20.18.05\" width=\"816\" height=\"129\" class=\"aligncenter size-full wp-image-3556\" srcset=\"http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.18.05.png 816w, http:\/\/blog.wenzlaff.de\/wp-content\/uploads\/2014\/06\/Bildschirmfoto-2014-06-17-um-20.18.05-300x47.png 300w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><br \/>\nUnd wieder checken ob grunt l\u00e4uft mit:<\/p>\n<p><code>grunt -version<\/code><\/p>\n<p>Ausgabe:<br \/>\n<code>grunt-cli v0.1.13<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wer den Taskrunner Grunt installieren will, um vieles zu automatisieren, muss nur node.js und npm installieren. Also hier eine Anleitung in 3 Schritten: Node.js Wer eine Serverseitige Plattform zum Betrieb von Netzwerkanwendungen wie Webserver ben\u00f6tigt, ist bei Node.js richtig. Mit Node.js kann man mit ein paar Zeilen JavaScript einen Webserver schreiben. Es gibt mehrere Methoden &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=3550\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eWie kann grunt via npm und node.js auf  OSX 10.9 Mavericks mit Port installiert werden?\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[220,229,254,79,7],"tags":[2184,1530,137,1532,1531,333],"class_list":["post-3550","post","type-post","status-publish","format-standard","hentry","category-anleitung","category-imac-2","category-os-x-2","category-programmierung","category-tools","tag-anleitung","tag-grunt","tag-installieren","tag-node-js-osx-10-9-mavericks","tag-npm","tag-port"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/3550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3550"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/3550\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3550"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}