
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
gulp-include-file
Advanced tools
Include the contents of a file inside a javascript file. This module will read the contents of the file specified and then create a javascript string which will be injected at the place specified.
npm install gulp-include-file
Given the following javascript file:
function getText() {
return INCLUDE_FILE("example.txt");
}
And the following example.txt in the same directory:
Hello world!
This is a string.
This module will generate the following file:
function getText() {
return "Hello world\n\nThis is a string.";
}
Using this example gulpfile:
var gulp = require('gulp');
var include_file = require('gulp-include-file');
gulp.task('example', function () {
gulp.src('./src/scripts/**/*.js')
.pipe(include_file())
.pipe(gulp.dest('./dist'));
});
This module is released under the MIT license.
FAQs
Include the contents of a file in javascript as a string.
We found that gulp-include-file 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 now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.