创建一个包含所有devDependencies的package.json

时间:2015-08-19 04:52:41

标签: json node.js terminal npm gulp

问题

我想知道是否在终端中执行npm init创建package.json以便与Gulp一起使用,如果您可以在文件中列出所有devDependencies而不是手动安装或从另一个项目克隆文件?

devDependencies

  "devDependencies": {
    "browser-sync": "^2.8.2",
    "gulp": "^3.9.0",
    "gulp-autoprefixer": "^2.3.1",
    "gulp-cache": "^0.2.10",
    "gulp-concat": "^2.6.0",
    "gulp-imagemin": "^2.3.0",
    "gulp-jshint": "^1.11.2",
    "gulp-minify-css": "^1.2.0",
    "gulp-notify": "^2.2.0",
    "gulp-plumber": "^1.0.1",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^2.0.4",
    "gulp-uglify": "^1.2.0",
    "gulp-watch": "^4.3.4"
  }

1 个答案:

答案 0 :(得分:0)

您可能正在寻找的是某种默认@if(View::exists('path.to.view')) @include('path.to.view') @endif 。它可以在初始化项目时创建。它在Gulp getting started guide的第2步中进行了描述。

Blade::directive('includeIfExists', function($view) {

});

安装Gulp后应执行此命令。