簡體   English   中英

運行grunt茉莉花后在項目中創建的.grunt文件夾

[英].grunt folder created in the project after run grunt jasmine

我今天才注意到,當我跑步時: grunt jasmine

那在我的主項目文件夾中使用:grunt-contrib-jasmine創建一個文件夾.grunt,這是正常的嗎? 我不這么認為。

我正在使用Phantomjs通過終端進行測試

我的node_modules中已經有該文件夾grunt-contrib-jasmine

我不明白為什么每次運行測試時都會創建該文件夾,您知道嗎?

package.json

"devDependencies": {
    "grunt": "*",
    "grunt-contrib-concat": "*",
    "grunt-contrib-jade": "*",
    "grunt-contrib-jasmine": "*",
    "grunt-contrib-jshint": "*",
    "grunt-contrib-sass": "*",
    "grunt-contrib-uglify": "*",
    "grunt-contrib-watch": "*"
  },
  "dependencies": {
    "phantomjs": "^1.9.18"
  }

Gruntfile.js

var jasmine;
    config.jasmine = jasmine = {};

    jasmine.test = {
        src:"public/javascripts/test/test.js"
        , options:{
            specs: "spec/test.spec.js"
            , keepRunner: true
            // , host: 'http://localhost/demo-site/'
        }
    };

這是正常的行為。 沒錯,Jasmine的代碼已經存儲在node_modules/下的某個node_modules/ ,但是大多數人將其設置為版本控制系統(例如git)忽略。 node_modules/之外創建一個文件夾意味着Jasmine的代碼可以存儲在存儲庫中,從而可以通過GitHub Pages托管在Web

這對於正在開發JavaScript庫的人非常有用,因為它允許訪問托管站點的人直接運行測試。

我個人希望能夠更改已保存的Jasmine代碼的位置,因為我已經有了一個保存SpecRunner的test/目錄。 .grunt目錄上存在GitHub問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM