From 6af65a541cdd994b19718bb1cf8d03a72d56f4e2 Mon Sep 17 00:00:00 2001 From: mifi Date: Wed, 24 May 2023 12:39:11 -0400 Subject: [PATCH] Pipeline and build cleanup --- .drone.yml | 13 +++++++------ .npmignore | 2 +- package.json | 2 +- tsconfig.json | 3 ++- tsconfig.production.json | 17 +++++++++++++++++ 5 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 tsconfig.production.json diff --git a/.drone.yml b/.drone.yml index dafa126..fb2e8b5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ workspace: steps: - name: yarn install - image: node:latest + image: node:20-bullseye-slim environment: YARN_VERSION: 3.5.0 commands: @@ -46,7 +46,7 @@ steps: - name: Build image: node:latest commands: - - yarn build + - yarn build:production - name: Send Build Status Notifications image: plugins/webhook settings: @@ -85,24 +85,25 @@ workspace: steps: - name: Build - image: node:latest + image: node:20-bullseye-slim environment: YARN_VERSION: 3.5.0 commands: - yarn set version stable - yarn install - - yarn build + - yarn build:production volumes: - name: yarnrc path: /drone/auth/.yarnrc.yml - name: Publish NPM - image: node:20-alpine - failure: ignore + image: node:20-bullseye-slim commands: - yarn npm publish volumes: - name: npmrc path: /drone/auth/.npmrc + - name: yarnrc + path: /drone/auth/.yarnrc.yml - name: Report NPM Publish Status image: plugins/webhook settings: diff --git a/.npmignore b/.npmignore index dbae1f7..56926a9 100644 --- a/.npmignore +++ b/.npmignore @@ -6,5 +6,5 @@ babel.config.* jest.config.* src -tsconfig.json +tsconfig*.json tslint.json diff --git a/package.json b/package.json index 8a8d78d..2e7b9df 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "license": "MIT", "scripts": { "build": "tsc", - "build:production": "tsc -p .", + "build:production": "tsc -p ./tsconfig.production.json", "format": "prettier:fix && lint:fix", "lint": "eslint --ext .ts,.tsx src/", "lint:fix": "eslint --fix --ext .ts,.tsx src/", diff --git a/tsconfig.json b/tsconfig.json index d2d3dff..422e4f8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,7 +10,8 @@ "rootDirs": ["./", "src/"], "strict": true, "esModuleInterop": true, - "sourceMap": false + "sourceMap": true, + "removeComments": false }, "include": ["src"] } diff --git a/tsconfig.production.json b/tsconfig.production.json new file mode 100644 index 0000000..48f8fba --- /dev/null +++ b/tsconfig.production.json @@ -0,0 +1,17 @@ +{ + "extends": "@tsconfig/node16/tsconfig.json", + "compilerOptions": { + "allowSyntheticDefaultImports": true, + "declaration": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noImplicitAny": true, + "outDir": "lib/", + "rootDirs": ["./", "src/"], + "strict": true, + "esModuleInterop": true, + "sourceMap": false, + "removeComments": true + }, + "include": ["src"] +}