From fd005e3f6569d4496f9107d55d9b557265b20d89 Mon Sep 17 00:00:00 2001 From: saurabhdaware Date: Wed, 2 Mar 2022 22:43:28 +0530 Subject: [PATCH] fix: remove test files from dist --- packages/abell/package.json | 4 ++-- .../vite-plugin-abell/compiler/compiler.spec.ts | 14 -------------- packages/abell/tsconfig.build.json | 4 ++++ packages/abell/tsconfig.json | 2 +- 4 files changed, 7 insertions(+), 17 deletions(-) create mode 100644 packages/abell/tsconfig.build.json diff --git a/packages/abell/package.json b/packages/abell/package.json index f0a96d5b..6792cf29 100644 --- a/packages/abell/package.json +++ b/packages/abell/package.json @@ -1,6 +1,6 @@ { "name": "abell", - "version": "1.0.0-alpha.36", + "version": "1.0.0-alpha.37", "description": "", "bin": "./dist/bin.js", "main": "./dist/index.js", @@ -13,7 +13,7 @@ "scripts": { "test": "vitest", "test:once": "vitest run", - "build": "tsc && node scripts/post-build.js", + "build": "tsc --project tsconfig.build.json && node scripts/post-build.js", "eslint": "eslint", "dev": "node ./dist/bin.js dev", "prepublishOnly": "yarn test:once && yarn eslint && yarn build" diff --git a/packages/abell/src/vite-plugin-abell/compiler/compiler.spec.ts b/packages/abell/src/vite-plugin-abell/compiler/compiler.spec.ts index 49437016..a9dd6cd3 100644 --- a/packages/abell/src/vite-plugin-abell/compiler/compiler.spec.ts +++ b/packages/abell/src/vite-plugin-abell/compiler/compiler.spec.ts @@ -21,13 +21,6 @@ describe('compile()', () => { {{ 3 + 4 }} {{ 'Helloo'.toUpperCase() }} -
- {{ - [1, 2, 3].map(i => - i * 2 - ) - }} -
`; const out = compile(abellCode, { @@ -45,13 +38,6 @@ describe('compile()', () => { " \${e( 3 + 4 )} \${e( 'Helloo'.toUpperCase() )} -
- \${e( - [1, 2, 3].map(i => - i * 2 - ) - )} -
" `); }); diff --git a/packages/abell/tsconfig.build.json b/packages/abell/tsconfig.build.json new file mode 100644 index 00000000..40e30a53 --- /dev/null +++ b/packages/abell/tsconfig.build.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": ["src/**/*.spec.ts", "src/**/__tests__"] +} \ No newline at end of file diff --git a/packages/abell/tsconfig.json b/packages/abell/tsconfig.json index 1828b342..aec7a2c9 100644 --- a/packages/abell/tsconfig.json +++ b/packages/abell/tsconfig.json @@ -6,5 +6,5 @@ "rootDir": "src", }, "include": ["src"], - "exclude": ["node_modules", "dist", "scripts","defaults"] + "exclude": ["node_modules", "dist", "scripts", "defaults"] } \ No newline at end of file