AngularJS 学习笔记之环境搭建

2015年02月25日 javascript 暂无评论 阅读 1,246 views 次
  1. 您需要安装Node.js和Testacular来运行本项目,请到Node.js官方网站下载并安装最新版,然后把node可执行程序路径添加到系统环境变量PATH2015-02-25_103604 ,完成后在命令行中运行一下命令可以查看是否安装成功:
    
    
    node --version(注意这里是两个横扛)或者用 node -v 也可以

    然后安装Testacular单元测试程序,请运行如下命令:

    npm install -g testacular
  2. 安装Git工具,然后用以下命令从Github复制本教程项目的源代码文件:
    git clone https://github.com/angular/angular-seed.git
    cd angular-seed
    
    
    git clone --depth=1 https://github.com/angular/angular-seed.git <your-project-name>
    npm install
    
    

    GIT命令执行时可能会中断下载,只需要按下ctrl+c,就可以继续下载。您也可以直接从网上下载本教程项目源代码的镜像归档压缩包。这个命令会在您当前文件夹中建立新文件夹angular-phonecat2015-02-25_102008

  3. 最后一件事要做的就是确保您的计算机安装了web浏览器和文本编辑器。
  4. 进入教程源代码文件包angular-phonecat,运行服务器后台程序,开始学习AngularJS!
    cd angular-phonecat
    npm run update-webdriver

 

C:\Users\dell\nodejsstudy\angular-phonecat>npm run update-webdriver

> angular-phonecat@0.0.0 preupdate-webdriver C:\Users\dell\nodejsstudy\angular-phonecat
> npm install

npm WARN engine karma@0.12.31: wanted: {"node":"~0.8 || ~0.10"} (current: {"node":"0.12.0","npm":"2.5.1"})
npm WARN optional dep failed, continuing fsevents@0.3.5
|
> ws@0.4.32 install C:\Users\dell\nodejsstudy\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\dell\nodejsstudy\angular-phonecat\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "D:\node\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
\
> angular-phonecat@0.0.0 postinstall C:\Users\dell\nodejsstudy\angular-phonecat
> bower install

bower angular-mocks#1.3.x not-cached git://github.com/angular/bower-angular-mocks.git#1.3.x
bower angular-mocks#1.3.x resolve git://github.com/angular/bower-angular-mocks.git#1.3.x
bower bootstrap#~3.1.1 not-cached git://github.com/twbs/bootstrap.git#~3.1.1
bower bootstrap#~3.1.1 resolve git://github.com/twbs/bootstrap.git#~3.1.1
bower angular#1.3.x cached git://github.com/angular/bower-angular.git#1.3.3
bower angular#1.3.x validate 1.3.3 against git://github.com/angular/bower-angular.git#1.3.x
bower jquery#~2.1.1 cached git://github.com/jquery/jquery.git#2.1.3
bower jquery#~2.1.1 validate 2.1.3 against git://github.com/jquery/jquery.git#~2.1.1
bower angular-mocks#1.3.x download https://github.com/angular/bower-angular-mocks/archive/v1.3.14.tar.gz
bower angular#1.3.x new version for git://github.com/angular/bower-angular.git#1.3.x
bower angular#1.3.x resolve git://github.com/angular/bower-angular.git#1.3.x
bower angular#1.3.x download https://github.com/angular/bower-angular/archive/v1.3.14.tar.gz
bower angular-mocks#1.3.x extract archive.tar.gz
bower angular-mocks#1.3.x resolved git://github.com/angular/bower-angular-mocks.git#1.3.14
bower angular#1.3.x extract archive.tar.gz
bower angular#1.3.x resolved git://github.com/angular/bower-angular.git#1.3.14
bower bootstrap#~3.1.1 not-cached git://github.com/twbs/bootstrap.git#~3.1.1
bower bootstrap#~3.1.1 resolve git://github.com/twbs/bootstrap.git#~3.1.1
bower jquery#~2.1.1 cached git://github.com/jquery/jquery.git#2.1.3
bower jquery#~2.1.1 validate 2.1.3 against git://github.com/jquery/jquery.git#~2.1.1
bower angular#1.3.x cached git://github.com/angular/bower-angular.git#1.3.14
bower angular#1.3.x validate 1.3.14 against git://github.com/angular/bower-angular.git#1.3.x
bower angular-mocks#1.3.x cached git://github.com/angular/bower-angular-mocks.git#1.3.14
bower angular-mocks#1.3.x validate 1.3.14 against git://github.com/angular/bower-angular-mocks.git#1.3.x
bower bootstrap#~3.1.1 download https://github.com/twbs/bootstrap/archive/v3.1.1.tar.gz
bower jquery#~2.1.1 install jquery#2.1.3
bower angular-mocks#1.3.x install angular-mocks#1.3.14
bower angular#1.3.x install angular#1.3.14
bower bootstrap#~3.1.1 install bootstrap#3.1.1

jquery#2.1.3 app\bower_components\jquery

angular-mocks#1.3.14 app\bower_components\angular-mocks
└── angular#1.3.14

angular#1.3.14 app\bower_components\angular

bootstrap#3.1.1 app\bower_components\bootstrap
└── jquery#2.1.3

> angular-phonecat@0.0.0 update-webdriver C:\Users\dell\nodejsstudy\angular-phonecat
> webdriver-manager update

Updating selenium standalone
downloading http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar
Updating chromedriver
downloading https://chromedriver.storage.googleapis.com/2.10/chromedriver_win32.zip...
chromedriver_2.10.zip downloaded to C:\Users\dell\nodejsstudy\angular-phonecat\node_modules\protracto

C:\Users\dell\nodejsstudy\angular-phonecat>npm run update-webdriver

> angular-phonecat@0.0.0 preupdate-webdriver C:\Users\dell\nodejsstudy\angular-phonecat
> npm install

npm WARN package.json karma-chrome-launcher@0.1.7 No README data

> angular-phonecat@0.0.0 postinstall C:\Users\dell\nodejsstudy\angular-phonecat
> bower install
> angular-phonecat@0.0.0 update-webdriver C:\Users\dell\nodejsstudy\angular-phonecat
> webdriver-manager update

selenium standalone is up to date.
chromedriver is up to date.

 

-----------------------------------继续--------------------------------------------

C:\Users\dell\nodejsstudy\angular-phonecat>git checkout -f step-0
HEAD is now at 96a9b5b... step-0 bootstrap angular app

 

C:\Users\dell\nodejsstudy\angular-phonecat>npm install
npm WARN package.json karma-chrome-launcher@0.1.7 No README data

> angular-phonecat@0.0.0 postinstall C:\Users\dell\nodejsstudy\angular-phonecat
> bower install
C:\Users\dell\nodejsstudy\angular-phonecat>npm start

> angular-phonecat@0.0.0 prestart C:\Users\dell\nodejsstudy\angular-phonecat
> npm install

npm WARN package.json karma-chrome-launcher@0.1.7 No README data

> angular-phonecat@0.0.0 postinstall C:\Users\dell\nodejsstudy\angular-phonecat
> bower install
> angular-phonecat@0.0.0 start C:\Users\dell\nodejsstudy\angular-phonecat
> http-server -a 0.0.0.0 -p 8000

Starting up http-server, serving ./ on port: 8000
Hit CTRL-C to stop the server

2015-02-25_110422

给我留言

您必须 登录 才能发表留言!

Copyright © 大一网 保留所有权利.  

用户登录

分享到: