Add clean-publish

pull/45/head
Nikita Karamov 2022-02-11 14:49:03 +01:00
parent bdda39b8ef
commit db92342732
No known key found for this signature in database
GPG Key ID: 3C8E688C96EEB9C9
1 changed files with 12 additions and 2 deletions

View File

@ -42,11 +42,14 @@
"lint": "prettier --check . && eslint .",
"size": "size-limit",
"test": "pnpm run lint && pnpm run build && pnpm run size",
"postversion": "pnpm run build"
"postversion": "pnpm run build",
"prepublishOnly": "rm -rf ./package && clean-publish",
"postpublish": "rm -rf ./package"
},
"devDependencies": {
"@size-limit/preset-small-lib": "^7.0.5",
"autoprefixer": "^10.4.2",
"clean-publish": "^4.0.0",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-unicorn": "^40.1.0",
@ -69,5 +72,12 @@
"limit": "1 KB",
"path": "./dist/shareon.es.js"
}
]
],
"publishConfig": {
"directory": "package"
},
"clean-publish": {
"withoutPublish": true,
"tempDir": "package"
}
}