diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1b55cff..9eaa0b4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,7 +24,7 @@ jobs: run: npm install - name: 🛠️ Build - run: mkdir node_modules/@types/gpstime && cp src/gpstime.d.ts node_modules/@types/gpstime/index.d.ts && npm run build + run: npm run types && npm run build - name: 🧑‍🔬 Tests run: npm run test @@ -49,7 +49,7 @@ jobs: run: npm install - name: 🛠️ Build - run: mkdir node_modules/@types/gpstime && cp src/gpstime.d.ts node_modules/@types/gpstime/index.d.ts && npm run build + run: npm run types && npm run build - name: 🚀 Publish to npm run: npm publish --access public diff --git a/package.json b/package.json index dfba66f..75c6447 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "scripts": { "test": "jest", "test:coverage": "jest --coverage", + "types": "mkdir node_modules/@types/gpstime && cp src/gpstime.d.ts node_modules/@types/gpstime/index.d.ts", "build": "tsc", "start": "ts-node-dev ./src/index.ts" }, diff --git a/tsconfig.json b/tsconfig.json index 07a0fb4..1abc9ef 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,7 +28,7 @@ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - "typeRoots": ["node_modules/@types"], /* Specify multiple folders that act like './node_modules/@types'. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ // "types": [], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */