Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@shimo/gulp-build
Advanced tools
Compress your backend codes in private-deploy-env.
$ npm install --save-dev @shimo/gulp-build
The plug-in takes a option and process the current folder codes to a sub-dir for private-deploy.
const gulp = require('gulp');
const gulpBuild = require('@shimo/gulp-build');
gulp.task('private-deploy', () => gulpBuild({
dest: './release'
});
dest
The destination dir you want to generate to, like ./release
.
copyResources
The resource files you want to copy to dest without any change.
gulpBuild({
// dest, ...
copyResources: [
'./config/default.toml',
'./config/test.toml',
'./database/migrations/*',
'./test/**'
]
})
entries
The files you want to webpack.
gulpBuild({
// dest, ...
entries: [
'./server.js',
'./bin/migrate.js'
]
})
nodeModuleFilter
This is a function which can exclude some modules to the dest dir. you may not want to webpack some modules in node_modules dir which is in your own private npm registery. using this function you can do this.
gulpBuild({
// dest, ...
nodeModuleFilter (x) {
return x.indexOf('shimo') === -1 &&
x.indexOf('richdoc') === -1
}
})
modifyPkg
The function can modify the package.json in the dest dir. some modules is useless in clients' server and it may occur error if you not modify the package.json.
gulpBuild({
// dest, ...
modifyPkg (pkg) {
['dependencies', 'devDependencies'].forEach(bigKey => {
Object.keys(pkg[bigKey]).forEach(key => {
if (key.indexOf('shimo') > -1) {
delete pkg[bigKey][key]
}
})
})
delete pkg.scripts.preinstall
delete pkg.scripts.install
return pkg
}
})
MIT
FAQs
Compress your backend codes.
The npm package @shimo/gulp-build receives a total of 1 weekly downloads. As such, @shimo/gulp-build popularity was classified as not popular.
We found that @shimo/gulp-build demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.