Simple file system utility for npm scripts
npm install fsbinjs
"scripts": {
"dev": "webpack-dev-server",
"build": "fsbin emptyDir buid && webpack"
}
`
Usage
npm install fsbin, then use it in your package.json.
It simply exposes fs-extra functionalities. Examples:
`
fsbin emptyDir
fsbin copy
fsbin mkdirs build/static/styles
fsbin remove build/static
`
In create-mithril-app, I used the following for the build pipeline:
`js
"scripts": {
"build": "fsbin emptyDir build && fsbin copy public build && webpack"
}
`
The above script empties the build folder, then repopulates it with both static files and webpacked files.
Special Thanks
Special thanks to the fs-extra` team.