Windows 環境下 NodeJs 開發 Log

安裝 NodeJs, npm.node

 

環境變量配置.git

 

1, Gruntgithub

安裝 : chrome

npm install -g grunt-cli
npm install -g grunt

 

package.jsonnpm

{
  "name": "my-project-name",
  "version": "0.1.0",
  "devDependencies": {
    "grunt": "~0.4.5",
    "grunt-contrib-jshint": "~0.10.0",
    "grunt-contrib-nodeunit": "~0.4.1",
    "grunt-contrib-uglify": "~0.5.0"
  }
}

 

 

使用Grunt 進行 Karma 測試任務是出現 json

    Please set env variable CHROME_BIN 錯誤時grunt

 在命令行輸入 測試



SET CHROME_BIN=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
設置臨時環境變量或添加 CHROME_BIN 到 系統環境變量中去便可解決.(有一些狀況下, 添加系統環境變量後沒有當即生效, 從新打開命令行/註銷系統重啓能夠解決.)



引用: http://stackoverflow.com/questions/16017896/setting-environment-variable-for-chrome-bin-does-not-workspa

http://stackoverflow.com/questions/18924263/how-to-fix-error-please-set-env-variable-chrome-bin-when-running-angular-js-wi命令行

https://github.com/karma-runner/karma/blob/master/docs/config/03-browsers.md#correct-path-to-browser-binary

http://gruntjs.com/

2, Karma

相關文章
相關標籤/搜索