From c730a25df85538f1f2eeca9c1e08cb47ffdd6ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Mon, 20 Apr 2020 19:18:44 +0800 Subject: [PATCH] add cat script to append image.d.ts --- doric-js/index.d.ts | 4 ++++ doric-js/package.json | 2 +- {doric-demo => doric-js}/src/image.d.ts | 0 3 files changed, 5 insertions(+), 1 deletion(-) rename {doric-demo => doric-js}/src/image.d.ts (100%) diff --git a/doric-js/index.d.ts b/doric-js/index.d.ts index 1fd676da..3d415fe4 100644 --- a/doric-js/index.d.ts +++ b/doric-js/index.d.ts @@ -1282,3 +1282,7 @@ declare module 'doric/lib/src/pattern/mvvm' { } } +declare module '*.png' { + const value: any; + export default value; +} \ No newline at end of file diff --git a/doric-js/package.json b/doric-js/package.json index bd5867d0..2ddeb2cd 100644 --- a/doric-js/package.json +++ b/doric-js/package.json @@ -6,7 +6,7 @@ "types": "index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "build": "tsc -p tsconfig.es5.json && mv -f lib-es5/src/ui/view.es5.js lib-es5/src/ui/view.js && tsc -d -p . && rollup -c && dts-bundle --configJson dts-bundle.json", + "build": "tsc -p tsconfig.es5.json && mv -f lib-es5/src/ui/view.es5.js lib-es5/src/ui/view.js && tsc -d -p . && rollup -c && dts-bundle --configJson dts-bundle.json && cat src/image.d.ts >> index.d.ts", "dev": "tsc -w -p . & rollup -c -w", "clean": "rm -rf lib && rm -rf lib-es5 && rm -rf bundle", "prepublish": "npm run build" diff --git a/doric-demo/src/image.d.ts b/doric-js/src/image.d.ts similarity index 100% rename from doric-demo/src/image.d.ts rename to doric-js/src/image.d.ts