Gathering detailed insights and metrics for gulp-less-changed
Gathering detailed insights and metrics for gulp-less-changed
Gathering detailed insights and metrics for gulp-less-changed
Gathering detailed insights and metrics for gulp-less-changed
gulp-less
Less for Gulp
gulp-changed
Only pass through changed files
@types/gulp-less
TypeScript definitions for gulp-less
gulp-dependents
Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of pcss, less, scss, sass, with extensibility points to support other file types.
npm install gulp-less-changed
62.6
Supply Chain
98.2
Quality
72.8
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Stars
179 Commits
2 Forks
2 Watching
4 Branches
3 Contributors
Updated on 23 Sept 2021
JavaScript (83.41%)
TypeScript (15.98%)
Less (0.61%)
Cumulative downloads
Total Downloads
Last day
-64.3%
599
Compared to previous day
Last week
-17.6%
7,995
Compared to previous week
Last month
-13.4%
38,562
Compared to previous month
Last year
127.1%
254,342
Compared to previous year
1
41
gulp-less-changed
A Gulp plugin to pass through LESS files only if they or their dependencies have changed
Analyses LESS files and their dependencies, i.e., imports and files included using data-uri
, to save wasting time
regenerating output.
$ npm install gulp-less-changed --save-dev
gulp-less-changed
where the CSS output is generated next to the LESS input1const gulp = require('gulp'); 2const lessChanged = require('gulp-less-changed'); 3const less = require('gulp-less'); 4 5gulp.task('default', () => { 6 return gulp.src('src/*.less') 7 .pipe(lessChanged()) 8 .pipe(less()) 9 .pipe(gulp.dest('src')); 10});
gulp-less-changed
where the CSS output has a different path and extension1const gulp = require('gulp'); 2const lessChanged = require('gulp-less-changed'); 3const rename = require('rename'); 4const less = require('gulp-less'); 5const cleanCss = require('gulp-clean-css'); 6const gulpRename = require('gulp-rename'); 7 8const OutputPath = 'dest'; 9const MinifiedExtension = '.min.css'; 10 11gulp.task('default', () => { 12 return gulp.src('src/*.less') 13 .pipe(lessChanged({ 14 getOutputFileName: file => rename(file, { dirname: OutputPath, extname: MinifiedExtension }) 15 })) 16 .pipe(less()) 17 .pipe(cleanCss()) 18 .pipe(gulpRename({ extname: MinifiedExtension })) 19 .pipe(gulp.dest(OutputPath)); 20});
gulp-less-changed
for incremental builds1const gulp = require('gulp'); 2const lessChanged = require('gulp-less-changed'); 3const rename = require('rename'); 4const less = require('gulp-less'); 5const cleanCss = require('gulp-clean-css'); 6const gulpRename = require('gulp-rename'); 7 8const OutputPath = 'dest'; 9const MinifiedExtension = '.min.css'; 10 11gulp.task('css', () => { 12 return gulp.src('src/*.less') 13 .pipe(lessChanged({ 14 getOutputFileName: file => rename(file, { dirname: OutputPath, extname: MinifiedExtension }) 15 })) 16 .pipe(less()) 17 .pipe(cleanCss()) 18 .pipe(gulpRename({ extname: MinifiedExtension })) 19 .pipe(gulp.dest(OutputPath)); 20}); 21 22gulp.task('default', () => { 23 return gulp.watch('src/*.less', ['css']); 24});
As an optimisation, the import list for each file is kept in memory and on disk. If all of the imports for a particular file have the same timestamp, the import list for that file is assumed to be the same. This helps to speed up incremental builds.
For each input LESS file in the Gulp stream, looks for the corresponding CSS file. If the LESS file has a later timestamp than its corresponding CSS file, or if any of the LESS file's imports has a later timestamp than the CSS file, the LESS file is emitted to the stream.
If no options are specified, looks for a CSS file in the same path as the LESS file with a .css extension. Otherwise:
function
Map source paths to destination paths
(e.g. function(path) { return rename(path, { extname: 'min.css' }); }
)
Overrides the default behaviour of looking for .css files in the input path.string[]
Search paths for @import
s and files referenced using data-uri
. This
works in the same way as the paths
option for gulp-less.
Additional less options such as globalVars
can also be used: internally, less is used to discover imports. This means that
paths can be evaluated using less syntax.Copyright (c) 2016-2018 David Chandler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/5 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
93 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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