顯示具有 npm 標籤的文章。 顯示所有文章
顯示具有 npm 標籤的文章。 顯示所有文章

2015年11月15日

Ionic Framework 製作 Hybrid App - 1.準備環境

blog.ionic.io

因為一些大學課程需要的關係製作了這一系列的教學,在你深入的看這個教學之前,我們希望你可以先上網了解 Native App, Web App, Hybrid App 等等開發方法的優點和缺點,選擇最適合你的 App 開發方式。

你至少需要具備一些基礎的  HTML 和 Javascript 的知識來跟著我們實作這一系列的教學。


準備環境


我們需要 Node.js, npm, Cordova, and Ionic

什麼是 Node.js 和 npm?


Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.

more: https://nodejs.org/en/

什麼是 Cordova?


Mobile apps with HTML, CSS & JS. Target multiple platforms with one code base. Free and open source.

more: https://cordova.apache.org/

https://blog.codecentric.de/en/2014/11/ionic-angularjs-framework-on-the-rise/


什麼是 Ionic Framework?

Create mobile apps with the web technologies you love. Free and open source, Ionic offers a library of mobile-optimized HTML, CSS and JS components, gestures, and tools for building highly interactive apps. Built with Sass and optimized for AngularJS.

more: http://ionicframework.com/


前往第二章 建立一個測試 App


2013年11月27日

install nodejs with nvm and run node with forever

Install nvm (node version manager)
curl https://raw.github.com/creationix/nvm/master/install.sh | sh nvm install 0.10.22 nvm list
使用 nvm vi .nvmrc
.nvmrc 0.10.22
進入 nodejs nvm use 0.10.22 #or num use 使用 npm sudo npm cache clean -f sudo npm install -g n npm install -g n sudo n stable sudo npm install -g coffee-script npm install -g forever 使用 package.json { "name": "counter", "version": "0.0.1", "private": true, "dependencies": { "forever": ">= 0.10.9", "mongodb": ">= 1.3.19", "router": ">= 0.6.2", "lodash": ">= 2.3.0", "async": ">= 0.2.9", "coffee-script": ">= 1.6.3" } } install nodejs package with package.json npm install 使用 forever # watch file change forever start -w server.js # list all process forever list # restart all forever restartall # check log forever logs server.js forever logs server.js -n 100




2013年7月2日

安裝 html2jade 筆記

原來竟然有 html2jade 這種東西,以前都是手動改寫,太花時間了

但是安裝過程意外的問題重重,以下筆記

首先nodejs 要更新,更新時才發現原來已經到 node v0.10.12了呀,我還在 v0.8.x 的時代

之後 npm 也要更新

python 要使用2.7以上,尤其要檢查/usr/local/bin/python 的版本對應,不然會出現 Import Error: 找不到 multiprocessor

然後python對應正確後要重新安裝node-gyp,非常重要的一點是,要先清除cache!


git clone http://github.com/isaacs/npm.git cd npm sudo make install

sudo npm rm -g node-gyp npm clean cache sudo npm install -g node-gyp sudo npm install -g html2jade