
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
gulp-append
Advanced tools
An gulp plugin for writing .pipe 'data' to a file.
$ npm install --save-dev gulp-append
var gulp = require('gulp');
var append = require('gulp-append');
gulp.task('default', function () {
return gulp.src('src/file.json')
.pipe(append());
});
var gulp = require('gulp');
var append = require('gulp-append');
gulp.task('default', function () {
return gulp.src('src/file.json')
.pipe(append('some/path/appended-file.json'));
});
var gulp = require('gulp');
var append = require('gulp-append');
var nameFromPath = require('name-from-path');
gulp.task('append:transform', () => {
return gulp.src(
'README.md'
).pipe(append({
transform: {
path: function(file) {
return String(file.path)
},
name: function(file) {
return nameFromPath(file, true);
}
}
}
));
});
var gulp = require('gulp');
var append = require('gulp-append');
var nameFromPath = require('name-from-path');
gulp.task('append:transform', () => {
return gulp.src(
'README.md'
).pipe(append('some/path/to/file.json', {
transform: {
path: function(file) {
return String(file.path)
},
name: function(file) {
return nameFromPath(file, true);
}
}
}));
});
Type: string
Default: appended.json
The destination to write to.
append('some-file.json');
Type: boolean
Default: false
Wether or not the destination should be handled as json.
append({json: true});
Type: boolean
Default: false
Wether or not to name the items.
*** creates an named object when true (checkout the transform option to learn how to set an custom name)***
append({named: true});
Type: object
Default: undefined
Transform the file to your likes.
append({
transform: {
path: function(file) {
return String(file.path);
},
info: function(file) {
return 'some info ...';
}
}
});
MIT © Glenn Vandeuren
FAQs
Append a file the easy way
The npm package gulp-append receives a total of 173 weekly downloads. As such, gulp-append popularity was classified as not popular.
We found that gulp-append 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
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.