Publish the project file to the specified folder, and then it can be easily deployed to the server through tools such as FTP
npm install sbtpublish
{
"name": "publish",
"scripts": {
"sbtpublishconfig": "sbtpublish -c a.config.js",
"sbtpublish": "sbtpublish"
},
"dependencies": {
"sbtpublish": "sbtpublish"
}
}
module.exports = {
output: 'cccc',
ignore: [
'build'
],
lastModify: '1d'
}
- output Output folder
- ignore Ignore published files or folders
- lastModify /^([0-9.]+)([smhdMy]?)$/
npm run sbtpublishconfig
const path = require('path');
module.exports = function (appRoot) {
return {
output: path.resolve(appRoot, 'sbtpublish'),
ignore: [
]
}
}
appRoot is the folder where sbtpublish runs