Gathering detailed insights and metrics for gulp-memory-fs
Gathering detailed insights and metrics for gulp-memory-fs
Gathering detailed insights and metrics for gulp-memory-fs
Gathering detailed insights and metrics for gulp-memory-fs
Memory file system can also be used in gulp environment. - gulp环境下也可以使用内存文件系统。
npm install gulp-memory-fs
Typescript
Module System
Node Version
NPM Version
63
Supply Chain
94.1
Quality
73.7
Maintenance
100
Vulnerability
99.3
License
JavaScript (53.48%)
TypeScript (45.07%)
HTML (1.08%)
Shell (0.19%)
CSS (0.18%)
Total Downloads
4,236
Last Day
2
Last Week
3
Last Month
32
Last Year
1,487
MIT License
2 Stars
197 Commits
1 Forks
2 Watchers
5 Branches
1 Contributors
Updated on Sep 13, 2024
Minified
Minified + Gzipped
Latest Version
4.1.0
Package Id
gulp-memory-fs@4.1.0
Unpacked Size
46.78 kB
Size
10.63 kB
File Count
18
NPM Version
10.1.0
Node Version
20.9.0
Published on
Jul 29, 2024
Cumulative downloads
Total Downloads
Last Day
0%
2
Compared to previous day
Last Week
0%
3
Compared to previous week
Last Month
-50.8%
32
Compared to previous month
Last Year
289.3%
1,487
Compared to previous year
15
26
gulp-memory-fs
allows developers to use the memory file system ( memfs ) when building with gulp。
memory-fs is deprecated.
1const gulp = require('gulp'); 2const GulpMemoryFs = require('gulp-memory-fs'); 3 4const mfs = new GulpMemoryFs({ 5 dir: 'dist' 6}); 7 8function build() { 9 return gulp.src(path.join(__dirname, 'src/**/*.js')) 10 .pipe(mfs.changed()) // or mfs.changed('dist') 11 .pipe(mfs.dest()); // or mfs.dest('dist') 12} 13 14async function server() { 15 await mfs.createServer(); 16} 17 18function watch() { 19 gulp.watch('src/**/*.js', build); 20} 21 22exports.default = gulp.series( 23 build, 24 gulp.parallel(watch, server) 25);
Open the browser and type http://127.0.0.1:7777/
to start development.
Parameter | Type | Description | Default |
---|---|---|---|
port | number | Service port number | 7777 |
dir | string | Directory of resources | |
https | { key: string; cert: string; } | Configure the file address of the https certificate, service enables https. | |
reload | boolean | Whether the browser refreshes when the file is saved | false |
reloadTime | number | Delayed refresh time of the browser after the file is modified | 250 |
mock | { [key: string]: any | ((ctx: Context, next: Function) => void | Promise | Configuring mock data | |
proxy | { [key: string]: object; } | Configuring the proxy | |
mimeTypes | { [key: string]: string; } | Configure mimeTypes |
Since it is a memory file system, you cannot use gulp-changed
and use GulpMemoryFs.prototype.changed
to compile only the modified file.
Parameter | Type | Description |
---|---|---|
output | string | Output file directory |
Start the service.
The mapping rules of mock are as follows:
1const mock = { 2 // How to use 3 'GET /mock/data': { data: [1, 2] }, 4 5 // When the request method is omitted, the default request method is GET 6 '/mock/data': { data: [1, 2] }, 7 8 // Support for custom functions, API reference koa and @koa/router 9 'POST /mock/data': (ctx, next) => ctx.body = 'ok' 10};
The rules of the proxy are as follows:
1const proxy = { 2 '/proxy/raw/githubusercontent': { 3 target: 'https://raw.githubusercontent.com/', 4 changeOrigin: true, 5 pathRewrite: { 6 '^/proxy/raw/githubusercontent': '' 7 } 8 } 9};
Proxy configuration reference http-proxy-middleware.
1const mimeTypes = { 2 avif: 'image/avif' 3};
npm run example
npm run test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
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
Score
Last Scanned on 2025-06-30
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