Stub dist
link your project during the development.
npm install --save-dev stubb
In the package.json
of the package in need:
{
"scripts": {
"stub": "stubb"
}
}
Default project structure:
|-- package
|-- dist/
|-- index.js
|-- index.cjs
|-- index.mjs
|-- index.d.ts
|-- src/
|-- index.ts
|-- package.json
Set one or more entry paths. Default: src/index
{
"scripts": {
"stub": "stubb test/index,test/plugins"
}
}
The folder name/path of the output file. Default: dist
{
"scripts": {
"stub": "stubb --outputDir=ouput"
}
}
Auto fill in exports/main/module/types in package.json. Default: false
{
"scripts": {
"stub": "stubb --fill"
}
}
Open esm. Default: true
Open cjs. Default: true
Open types. Default: true