Gulp没有创建临时文件

时间:2017-10-12 18:43:18

标签: gulp gulp-watch

道歉,如果之前已经被问了1000次......但我找不到对我有用的答案!不幸的是,我正在跟随Udemy的课程,但无法在那里得到答案..

IM目前正在尝试在编辑我当前的CSS文件时创建另一个样式文件夹。 - 我使用Atom作为我的IDE并在macbook pro上运行。

Gulp文件:

var gulp = require('gulp'),
watch = require('gulp-watch');

gulp.task('default', function() {
  console.log('Created a gulp task');
});

gulp.task('html' , function() {
  console.log('Something with HTML');
});

gulp.task('styles' , function() {
  return gulp.src('./app/assets/styles/styles.css')
  .pipe(gulp.dest('./app/temp/styles/'));
});

gulp.task('watch', function() {

  watch('./app/index.html', function() {
    gulp.start('html');
  });

  watch('./app/assets/styles/**/*.css', function() {
    gulp.start('styles');
});

});

Package.json文件:

{
  "name": "Website",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "HIDDEN"
  },
  "keywords": [
    ""
  ],
  "author": "KeithyBoi",
  "license": "ISC",
  "bugs": {
    "url": "HIDDEN"
  },
  "homepage": "HIDDEN",
  "dependencies": {
    "jquery": "^3.2.1",
    "normalize.css": "^7.0.0"
  },
  "devDependencies": {
    "gulp": "^3.9.1",
    "gulp-postcss": "^7.0.0",
    "gulp-watch": "^4.3.11"
  }
}

0 个答案:

没有答案