Fixed linting issues with index.js
This commit is contained in:
parent
3928f02b01
commit
ae3fa21a3a
19
index.js
19
index.js
|
@ -1,14 +1,19 @@
|
|||
var gutil = require("gulp-util");
|
||||
var through = require("through2");
|
||||
var assign = require("object-assign");
|
||||
var path = require('path');
|
||||
var sass = require("node-sass");
|
||||
var gutil = require('gulp-util');
|
||||
var through = require('through2');
|
||||
var assign = require('object-assign');
|
||||
var path = require('path');
|
||||
var sass = require('node-sass');
|
||||
var applySourceMap = require('vinyl-sourcemaps-apply');
|
||||
|
||||
var PLUGIN_NAME = 'gulp-sass';
|
||||
|
||||
module.exports = function(options) {
|
||||
'use strict';
|
||||
|
||||
return through.obj(function(file, enc, cb) {
|
||||
var opts,
|
||||
callback;
|
||||
|
||||
if (file.isNull()) {
|
||||
return cb(null, file);
|
||||
}
|
||||
|
@ -19,7 +24,7 @@ module.exports = function(options) {
|
|||
return cb();
|
||||
}
|
||||
|
||||
var opts = assign({}, options);
|
||||
opts = assign({}, options);
|
||||
opts.file = file.path;
|
||||
|
||||
// Generate Source Maps if plugin source-map present
|
||||
|
@ -28,7 +33,7 @@ module.exports = function(options) {
|
|||
opts.omitSourceMapUrl = true;
|
||||
}
|
||||
|
||||
var callback = function(error, obj) {
|
||||
callback = function(error, obj) {
|
||||
if (error) {
|
||||
return cb(new gutil.PluginError(
|
||||
PLUGIN_NAME, error.message + ' on line ' + error.line + ' in ' + error.file
|
||||
|
|
Loading…
Reference in a new issue