Gathering detailed insights and metrics for gulp-dart-sass
Gathering detailed insights and metrics for gulp-dart-sass
Gathering detailed insights and metrics for gulp-dart-sass
Gathering detailed insights and metrics for gulp-dart-sass
npm install gulp-dart-sass
49.8
Supply Chain
97.9
Quality
72.9
Maintenance
100
Vulnerability
99.3
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
41 Stars
319 Commits
5 Forks
6 Watching
4 Branches
1 Contributors
Updated on 16 May 2024
JavaScript (93.78%)
SCSS (3.67%)
CSS (2.17%)
Sass (0.38%)
Cumulative downloads
Total Downloads
Last day
-36.7%
7,565
Compared to previous day
Last week
-10.5%
37,293
Compared to previous week
Last month
19.6%
154,388
Compared to previous month
Last year
2.1%
1,656,442
Compared to previous year
Sass plugin for Gulp, using the Dart Sass compiler.
Only Active LTS and Current releases are supported.
npm install gulp-dart-sass --save-dev
Something like this will compile your Sass files:
1'use strict'; 2 3var gulp = require('gulp'); 4var sass = require('gulp-dart-sass'); 5 6gulp.task('sass', function () { 7 return gulp.src('./sass/**/*.scss') 8 .pipe(sass().on('error', sass.logError)) 9 .pipe(gulp.dest('./css')); 10}); 11 12gulp.task('sass:watch', function () { 13 gulp.watch('./sass/**/*.scss', ['sass']); 14});
You can also compile synchronously, doing something like this:
1'use strict'; 2 3var gulp = require('gulp'); 4var sass = require('gulp-dart-sass'); 5 6gulp.task('sass', function () { 7 return gulp.src('./sass/**/*.scss') 8 .pipe(sass.sync().on('error', sass.logError)) 9 .pipe(gulp.dest('./css')); 10}); 11 12gulp.task('sass:watch', function () { 13 gulp.watch('./sass/**/*.scss', ['sass']); 14});
Pass in options just like you would for node-sass
; they will be passed along just as if you were using dart-sass
. Except for the data
option which is used by gulp-dart-sass internally. Using the file
option is also unsupported and results in undefined behaviour that may change without notice.
For example:
1gulp.task('sass', function () { 2 return gulp.src('./sass/**/*.scss') 3 .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError)) 4 .pipe(gulp.dest('./css')); 5});
gulp-dart-sass
can be used in tandem with gulp-sourcemaps to generate source maps for the Sass to CSS compilation. You will need to initialize gulp-sourcemaps prior to running gulp-dart-sass
and write the source maps after.
1var sourcemaps = require('gulp-sourcemaps'); 2 3gulp.task('sass', function () { 4 return gulp.src('./sass/**/*.scss') 5 .pipe(sourcemaps.init()) 6 .pipe(sass().on('error', sass.logError)) 7 .pipe(sourcemaps.write()) 8 .pipe(gulp.dest('./css')); 9});
By default, gulp-sourcemaps writes the source maps inline in the compiled CSS files. To write them to a separate file, specify a path relative to the gulp.dest()
destination in the sourcemaps.write()
function.
1var sourcemaps = require('gulp-sourcemaps'); 2gulp.task('sass', function () { 3 return gulp.src('./sass/**/*.scss') 4 .pipe(sourcemaps.init()) 5 .pipe(sass().on('error', sass.logError)) 6 .pipe(sourcemaps.write('./maps')) 7 .pipe(gulp.dest('./css')); 8});
gulp-dart-sass
is a very light-weight wrapper around dart-sass
, which is a port of Sass
. Because of this, the issue you're having likely isn't a gulp-dart-sass
issue, but an issue with one of those projects.
If you have a feature request/question how Sass works/concerns on how your Sass gets compiled/errors in your compiling, it's likely a dart-sass
or Sass
issue and you should file your issue with one of those projects.
If you're having problems with the options you're passing in, it's likely a dart-sass
or libsass
issue and you should file your issue with one of those projects.
We may, in the course of resolving issues, direct you to one of these other projects. If we do so, please follow up by searching that project's issue queue (both open and closed) for your problem and, if it doesn't exist, filing an issue with them.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More