From 31cde3e8a2973a6c779e8d48a0d9049d0dddab14 Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Thu, 19 May 2022 01:19:23 -0700 Subject: [PATCH] add clean-publish --- package.json | 12 +++++++++++- pnpm-lock.yaml | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b6a37fd..5b2eb7c 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,9 @@ "name": "trpc-nuxt", "type": "module", "version": "0.0.3", + "publishConfig": { + "directory": "package" + }, "packageManager": "pnpm@7.1.0", "license": "MIT", "main": "./dist/module.cjs", @@ -21,11 +24,17 @@ "dist", "*.d.ts" ], + "clean-publish": { + "withoutPublish": true, + "tempDir": "package" + }, "scripts": { - "prepublishOnly": "nr build", + "prepublishOnly": "rimraf ./package && nr build && clean-publish", + "postpublish": "rimraf ./package", "build": "nuxt-module-build", "play": "nr build && nuxi dev playground", "lint": "eslint .", + "lint:fix": "eslint . --fix", "release": "bumpp --commit --push --tag && pnpm publish", "prepare": "nuxi prepare playground" }, @@ -44,6 +53,7 @@ "@nuxt/module-builder": "latest", "@types/fs-extra": "^9.0.13", "bumpp": "^7.1.1", + "clean-publish": "^4.0.0", "eslint": "^8.14.0", "nuxt": "^3.0.0-rc.3", "ohash": "^0.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 449cf4f..6031a73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,6 +12,7 @@ importers: '@trpc/server': ^9.23.2 '@types/fs-extra': ^9.0.13 bumpp: ^7.1.1 + clean-publish: ^4.0.0 eslint: ^8.14.0 fs-extra: ^10.1.0 h3: ^0.7.8 @@ -37,6 +38,7 @@ importers: '@nuxt/module-builder': 0.1.7 '@types/fs-extra': 9.0.13 bumpp: 7.1.1 + clean-publish: 4.0.0 eslint: 8.15.0 nuxt: 3.0.0-rc.3 ohash: 0.1.0 @@ -1693,6 +1695,16 @@ packages: resolution: {integrity: sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==} dev: true + /clean-publish/4.0.0: + resolution: {integrity: sha512-PcOxJSnPgncx/ANmgPw8hj9DDtdLHTxIc6Vh/yXCX7IA9w1oUSx2POL0Vno/7omhyrKxMKTpnRh2wlzwH5zaCw==} + hasBin: true + dependencies: + cross-spawn: 7.0.3 + fast-glob: 3.2.11 + lilconfig: 2.0.5 + micromatch: 4.0.5 + dev: true + /clean-regexp/1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'}