
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
gulp-require-modules
Advanced tools
move required modules in node_modules to a new folder.
$ npm install --save-dev gulp-require-modules
var gulp = require('gulp');
var requireModules = require('gulp-require-modules');
gulp.task('default', function () {
return gulp.src('src/*.js')
.pipe(requireModules({dist: false}))
.pipe(gulp.dest());
});
this will:
node_modules
to dist/npm
dist/require-modules.json
var gulp = require('gulp');
var requireModules = require('gulp-require-modules');
var dist = 'dist';
gulp.task('default', function () {
return gulp.src('src/*.js')
.pipe(requireModules({dist: true, fromDirectory:'src', distDirectory: dist}))
.pipe(gulp.dest(dist));
});
this will:
node_modules
to dist/node_modules
dist/require-modules.json
require(modules)
to require('./npm/module/index.js')
.modulesDirectory: string
Default: 'dist/node_modules'
the new directory for modules
modulesManifestPath: string
Default: 'dist/require-modules.json'
path of manifest file
dist: boolean
Default: true
whether the requires in the file will be modified to new path.
distDirectory: string
Default: 'dist'
the directory where input file will be disted to. if null
, the requires of the file will not be modified.
fromDirectory: string
Default: 'src'
the directory where input file is from. if null
, use process.cwd
require('module')
require('./module/file')
require('./module/file.js')
require('./module/folder')
require('readable-stream/transform')
FAQs
move required modules in node_modules to a new folder
The npm package gulp-require-modules receives a total of 77 weekly downloads. As such, gulp-require-modules popularity was classified as not popular.
We found that gulp-require-modules 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.