diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4333babf..3e8eb1fc 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -25,9 +25,6 @@ jobs: - name: Build native deps run: scripts/build-native.js - - name: Build typings - run: yarn run build:typings - - name: Webpack run: yarn run build diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index dc441125..d26761ee 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,9 +25,6 @@ jobs: - name: Build native deps run: scripts/build-native.js - - name: Build typings - run: yarn run build:typings - - name: Webpack run: yarn run build diff --git a/package.json b/package.json index ff091860..b7fdb77a 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ }, "scripts": { "build": "npm run build:typings && webpack --color --config app/webpack.main.config.js && webpack --color --config app/webpack.config.js && webpack --color --config terminus-core/webpack.config.js && webpack --color --config terminus-settings/webpack.config.js && webpack --color --config terminus-terminal/webpack.config.js && webpack --color --config terminus-plugin-manager/webpack.config.js && webpack --color --config terminus-community-color-schemes/webpack.config.js && webpack --color --config terminus-ssh/webpack.config.js && webpack --color --config terminus-serial/webpack.config.js", - "build:typings": "tsc --project terminus-core/tsconfig.typings.json && tsc --project terminus-settings/tsconfig.typings.json && tsc --project terminus-terminal/tsconfig.typings.json && tsc --project terminus-plugin-manager/tsconfig.typings.json && tsc --project terminus-ssh/tsconfig.typings.json && tsc --project terminus-serial/tsconfig.typings.json", + "build:typings": "node scripts/build-typings.js", "watch": "cross-env TERMINUS_DEV=1 webpack --progress --color --watch", "start": "cross-env TERMINUS_DEV=1 electron app --debug", "prod": "cross-env TERMINUS_DEV=1 electron app", diff --git a/scripts/build-typings.js b/scripts/build-typings.js new file mode 100755 index 00000000..ad07db9f --- /dev/null +++ b/scripts/build-typings.js @@ -0,0 +1,9 @@ +#!/usr/bin/env node +const sh = require('shelljs') +const vars = require('./vars') +const log = require('npmlog') + +vars.builtinPlugins.forEach(plugin => { + log.info('typings', plugin) + sh.exec(`npx tsc --project ${plugin}/tsconfig.typings.json`) +}) diff --git a/terminus-community-color-schemes/tsconfig.typings.json b/terminus-community-color-schemes/tsconfig.typings.json new file mode 100644 index 00000000..c0d2273c --- /dev/null +++ b/terminus-community-color-schemes/tsconfig.typings.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "exclude": ["node_modules", "dist", "typings"], + "compilerOptions": { + "baseUrl": "src", + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "./typings", + "paths": { + "terminus-*": ["../../terminus-*"], + "*": ["../../app/node_modules/*"] + } + } +}