即使CSS文件为空,Gulp-Ruby-SASS也会出错

时间:2015-04-27 09:25:45

标签: npm gulp gulp-ruby-sass

我目前正在尝试更新我们的网络应用及其构建工具的样板。

我目前收到此错误:

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: Broken @import declaration of "branding", Broken @import declaration of "helper", Broken @import declaration of "routing"

我认为它是某种缓存问题,因为它应该解析的.scss文件是空的。包含brandingrouting等文件的项目是不同的,我绝对不会在终端中的错误文件夹中。

我该如何解决这个问题?可以/我应该清除缓存吗?怎么样?

完成: Gulpfile样式任务:

// Styles
gulp.task('styles', function() {
  return sass('src/css/app.scss', { 
      sourcemap: true,
      noCache: true
  })
    .on('error', function (err) {
      console.error('Error', err.message);
    })
    .pipe(autoprefixer('last 2 version', 'safari 5', 'ie 8', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
    .pipe(rename({ suffix: '.min' }))
    .pipe(minifycss())
    .pipe(gulp.dest('dist/css'))
    .pipe(notify({ message: 'Styles task complete' }));
});

的package.json

{
  "name": "boilerplate",
  "version": "1.0.0",
  "description": "Download as ZIP, **don't clone this repo** if you want to create a new project. Only clone if you want to update/change the boilerplate.",
  "main": "gulpfile.js",
  "dependencies": {
    "bower": "^1.3.12",
    "del": "^1.1.1",
    "gulp-autoprefixer": "^2.1.0",
    "gulp": "^3.8.11",
    "gulp-concat": "^2.5.1",
    "gulp-minify-css": "^0.4.6",
    "gulp-notify": "^2.2.0",
    "gulp-rename": "^1.2.0",
    "gulp-jshint": "^1.9.2",
    "gulp-ruby-sass": "^1.0.0",
    "gulp-uglify": "^1.1.0",
    "main-bower-files": "git://github.com/ck86/main-bower-files"
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "https://codeofsumit:091210sk@github.com/codeofsumit/boilerplate.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/codeofsumit/boilerplate/issues"
  },
  "homepage": "https://github.com/codeofsumit/boilerplate"
}

0 个答案:

没有答案