Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
gulp-imgdown
Advanced tools
when write blog in markdown, you may use external image in you post, this gulp plugin helps you to download image start with http(s) and save it locally.
fpath
: this path to save file local, image file name will use format md5(src) + ext
upath
: this path used to replace the origin image src in html file generated by .md file. the complete path will be upath + name
be careful with these parms, it may affect you html from showing the image correctly.
var gulp = require('gulp');
var markdown = require('gulp-markdown');
var imgdown = require('gulp-imgdown');
var path = require('path');
var base = __dirname;
gulp.task('markdown', function() {
return gulp.src('src/article/*.md')
.pipe(markdown())
.pipe(imgdown({
upath: '/images/a/',
fpath: path.join(base, '/images/a/')
}))
.pipe(gulp.dest(function(f) {
return f.base;
}));
});
gulp.task('default', function() {
gulp.watch('src/article/*.md', ['markdown']);
});
FAQs
down imgae in src file and save to local
The npm package gulp-imgdown receives a total of 5 weekly downloads. As such, gulp-imgdown popularity was classified as not popular.
We found that gulp-imgdown 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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.