diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..9c7ddbc --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,17 @@ +name: Test build steps + +on: + release: + types: [published] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - uses: actions/setup-node@v1 + - run: npm install + - run: npm run build + diff --git a/.gitignore b/.gitignore index e1ffbad..2a02ac3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ node_modules/ # Generated output dist +*.tsbuildinfo \ No newline at end of file diff --git a/package.json b/package.json index e7ee032..ad716ac 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "@antimatter-dimensions/notations", - "version": "3.2.0", + "version": "3.3.0", "description": "Notations used in Antimatter Dimensions", "scripts": { - "build": "npm run build:ad && npm run build:community", + "build": "tsc && npm run build:ad && npm run build:community", "build:ad": "bili --config bili.config.base.ts && cp dist/ad-notations.min.js docs/ad-notations.min.js", "build:community": "bili --config bili.config.community.ts && cp dist/ad-notations.community.min.js docs/ad-notations.community.min.js", "lint": "eslint .", @@ -13,6 +13,7 @@ "module": "dist/ad-notations.esm.js", "unpkg": "dist/ad-notations.umd.js", "jsdelivr": "dist/ad-notations.umd.js", + "types": "dist/types", "keywords": [ "notations", "numbers" diff --git a/src/utils.ts b/src/utils.ts index c1dfcec..c2f1760 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,5 +1,5 @@ import Decimal from "break_infinity.js"; -import { Settings } from "./settings.js"; +import { Settings } from "./settings"; function commaSection(value: string, index: number): string { if (index === 0) { diff --git a/tsconfig.json b/tsconfig.json index a08bdfb..5e07f7b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,6 @@ { + "include": ["src/**/*"], + "exclude": ["src/__tests__/*"], "compilerOptions": { "target": "es5", "incremental": true, @@ -8,6 +10,10 @@ "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "esModuleInterop": true + "esModuleInterop": true, + "declaration": true, + "emitDeclarationOnly": true, + "rootDir": "src/", + "outDir": "./dist/types" } }