Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gulp-sass-extended
Advanced tools
This project is an fork of gulp-sass
so look at first original version - https://github.com/dlmanning/gulp-sass
Use new project gulp-sass-monster
They work the same as the original >
addVariables
type Object
default undefined
Add your custom vars in gulp task.
This option is useful only if you calculate some conditions and want to add result values to sass render.
Static properties are easier to set in the files themselves.
Little details about values for this option:
Usage example
var gulp = require('gulp');
var sassExtended = require('gulp-sass-extended');
gulp.task('styles', function() {
var taskOptions = {
// original gulp-sass options
// ...
addVariables: {
PRODUCTION: yourProductionValue,
someOtherDynamicVar: calculatedValue, // '12px' for example
myColorsMap: {
color1: 'blue',
color2: 'yellow',
},
pointList: [
'1024px',
'1280px',
'1366px'
]
}
};
return gulp.src('./src/styles/*.scss')
.pipe( sassExtended(taskOptions) )
.pipe( gulp.dest('./dist/css') );
});
In *.scss files before send to node-sass render, will be added part of code with your vars in file content beginning
/* generated */ $PRODUCTION: true;
/* generated */ $someOtherDynamicVar: 12px;
/* generated */ $myColorsMap: (color1: blue, color2: yellow);
/* generated */ $pointList: (1024px, 1280px, 1366px);
/// then your code from file
If the content of your *.scss contains the @charset
directive, the variables will be inserted after this directive
You will notice some inconsistencies in line numbers in sourcemaps and in the original files. The more you add variables, the greater this discrepancy, because you will shift down the main content of the file.
errorHandler(error, throughCallback)
type function
default undefined
error {:Error}
emitted by node-sass
- see https://github.com/sass/node-sass#error-objectthroughCallback {:function}
- callback which you must call after doing your actions, first argument - your new error data;Add your custom method to handle errors.
afterRender(result, renderedFile)
type function
default undefined
result {:Object}
- result of the node-sass
render call - see https://github.com/sass/node-sass#result-objectrenderedFile {:Buffer}
- .scss file which was rendered;Do with it whatever you want on your own risk ))))
Remember that result
is a reference to an object that will be further processed taking into account the use of sourcemaps and saving new css files
And the changes inside it will also be in the main object
Here only original tests from the gulp-sass
This project is an fork of gulp-sass
so look at first original - gulp-sass/CONTRIBUTING.md
If you have problems with the tools that were added in gulp-sass-extended
version then go here gulp-sass-extended/issues
FAQs
Gulp plugin for sass. Extended version of gulp-sass.
The npm package gulp-sass-extended receives a total of 0 weekly downloads. As such, gulp-sass-extended popularity was classified as not popular.
We found that gulp-sass-extended demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.