-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update dependencies, fix css-sass.js #14
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.idea/ | ||
node_modules/ | ||
.DS_Store | ||
.DS_Store | ||
package-lock.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
var sass = require('node-sass'); | ||
var sass = require('sass'); | ||
var Vow = require('vow'); | ||
var inherit = require('inherit'); | ||
var CssPreprocessor = require('enb/lib/preprocess/css-preprocessor'); | ||
var CssPreprocessor = require('enb-css-preprocessor'); | ||
var vowFs = require('enb/lib/fs/async-fs'); | ||
var path = require('path'); | ||
var util = require('util'); | ||
|
@@ -12,15 +11,19 @@ Logger = new Logger(); | |
module.exports = require('enb/lib/build-flow').create() | ||
.name('enb-sass') | ||
.target('target', '?.css') | ||
.defineOption('sass', {}) // https://github.com/sass/node-sass#options | ||
// https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions | ||
// https://sass-lang.com/documentation/js-api/interfaces/LegacyFileOptions | ||
// https://sass-lang.com/documentation/js-api/interfaces/LegacyStringOptions | ||
.defineOption('sass', {}) | ||
.useFileList(['css', 'scss']) | ||
.builder(function (sourceFiles) { | ||
var _this = this; | ||
var deferred = Vow.defer(); | ||
var sassSettings = inherit({ | ||
var sassSettings = { | ||
includePaths: [], | ||
data: '' | ||
}, this._sass); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. это изменение не понимаю, в таком случае ведь перестают прокидываться внешние опции? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tadatuta , в перый раз года дебажил поправил чтобы |
||
data: '', | ||
..._this._options.sass | ||
}; | ||
var errorLogging = { | ||
enabled: true, | ||
offsetLines: 5 | ||
|
@@ -66,7 +69,6 @@ module.exports = require('enb/lib/build-flow').create() | |
deferred.resolve(cssResult); | ||
} catch (ex) { | ||
ex = ex instanceof Error ? ex : JSON.parse(ex); | ||
|
||
var lines = sassSettings.data.split('\n'); | ||
var errorCtx = lines.slice(ex.line - errorLogging.offsetLines, ex.line).concat( | ||
'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можешь, пожалуйста, заодно актуализировать комментарий на 14 строке?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tadatuta , готово