Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@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.
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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.