Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
clean-remains
Advanced tools
Readme
Remove files created in the last run but not anymore in the current one.
In development environment, build process are run once a file change detected. If a file is removed, the corresponding compiled file (like a browserify bundle) remains, which is redundant and should be deleted.
The following example make the 'build'
directory always has the same contents with the 'src'
directory.
const gulp = require('gulp')
const clean = require('clean-remains').glob('build/*.js')
gulp.task('sync', function () {
return gulp.src('src/*.js')
.pipe(gulp.dest('build'))
.pipe(clean())
.once('delete', files => console.log(files))
})
gulp.task('watch', ['sync'], function () {
gulp.watch('src/*.js', ['sync'])
})
You could delete the whole 'build'
directory in the example above.
However, if you do that and there are also css files in the 'build'
directory,
they will be deleted against your will.
const Clean = require('clean-remains')
Return a function like a gulp plugin,
which should be used after gulp.dest
.
initialFiles
Type: Array
Required.
If there are no redundant files before the first run, you could pass an empty array.
const gulp = require('gulp')
const clean = require('clean-remains')([])
patterns
and opts
are passed to [globby
] to create the initialFiles
.
FAQs
Remove files created in the last run but not anymore in the current one
The npm package clean-remains receives a total of 1 weekly downloads. As such, clean-remains popularity was classified as not popular.
We found that clean-remains 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.