diff --git a/.eslintignore b/.eslintignore index 3dddf3f6..cb92a946 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,2 +1,3 @@ dist/* node_modules/* +legacy/index* diff --git a/.gitignore b/.gitignore index ef996b00..da15c198 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,4 @@ npm-debug.log* coverage # legacy builds -/legacy/index.cjs -/legacy/index.cjs.map -/legacy/index.js -/legacy/index.js.map +/legacy/index* diff --git a/legacy/package.json b/legacy/package.json index eabede75..8a8e7a82 100644 --- a/legacy/package.json +++ b/legacy/package.json @@ -5,7 +5,8 @@ "module": "./legacy/index.js" }, "scripts": { - "unit": "jest -c jest.config.json" + "unit": "jest -c jest.config.json", + "emitDeclarations": "tsc index.js --allowJs --skipLibCheck --declaration --emitDeclarationOnly --declarationMap" }, "devDependencies": { "@babel/core": "7.17.9", diff --git a/package.json b/package.json index 0f01d736..4e2fad8a 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,9 @@ "scripts": { "prepublishOnly": "pnpm test && pnpm build && del ./package && clean-publish", "postpublish": "del ./package", - "emitDeclarations": "tsc --emitDeclarationOnly", + "emitDeclarations:legacy": "cd legacy && pnpm emitDeclarations", + "emitDeclarations:base": "tsc --emitDeclarationOnly", + "emitDeclarations": "pnpm emitDeclarations:base && pnpm emitDeclarations:legacy", "build": "rollup -c & pnpm emitDeclarations", "unit": "pnpm unit:base && pnpm unit:legacy", "unit:base": "jest -c jest.config.json",