From 161112ed41e7319932dfd586142b96617d76612b Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 3 Jul 2020 15:57:52 -0300 Subject: [PATCH] feat(tauri.js) add TS API definition files (.d.ts) (#740) * feat(tauri.js) build TS API definitions * chore(tauri.js) organize scripts * fix(tauri.js) build:typedefs on windows --- cli/tauri.js/package.json | 7 ++++--- cli/tauri.js/yarn.lock | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/tauri.js/package.json b/cli/tauri.js/package.json index a0fee050f..0a2b0a733 100644 --- a/cli/tauri.js/package.json +++ b/cli/tauri.js/package.json @@ -10,9 +10,10 @@ "url": "https://opencollective.com/tauri" }, "scripts": { - "build": "rollup -c --silent && webpack --progress", + "build": "yarn build:api && yarn build:typedefs && yarn build:webpack", "build:webpack": "webpack --progress", - "build:api": "rollup -c", + "build:api": "rollup -c && yarn build:typedefs", + "build:typedefs": "yarn tsc ./api-src/index.ts --declaration --emitDeclarationOnly --outDir api", "build-release": "yarn build --display none --progress false", "test": "jest --runInBand --no-cache --testPathIgnorePatterns=\"(build|dev)\"", "pretest": "yarn build", @@ -116,7 +117,7 @@ "toml-loader": "1.0.0", "ts-loader": "7.0.5", "tslib": "2.0.0", - "typescript": "3.9.6", + "typescript": "^3.9.6", "webpack": "4.43.0", "webpack-cli": "3.3.12", "webpack-node-externals": "1.7.2" diff --git a/cli/tauri.js/yarn.lock b/cli/tauri.js/yarn.lock index 119a5a63e..2906c118b 100644 --- a/cli/tauri.js/yarn.lock +++ b/cli/tauri.js/yarn.lock @@ -9434,7 +9434,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.9.6: +typescript@^3.9.6: version "3.9.6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.6.tgz#8f3e0198a34c3ae17091b35571d3afd31999365a" integrity sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==