From f801aa64f89b774c80097173c5051c423bd3d723 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 7 Dec 2021 19:13:42 +0800 Subject: [PATCH] refact: rename assets resource name --- doric-demo/src/ImageDemo.ts | 5 ++--- doric-js/bundle/doric-lib.es5.js | 10 +++++----- doric-js/bundle/doric-lib.js | 4 ++-- doric-js/bundle/doric-vm.js | 4 ++-- doric-js/index.d.ts | 2 +- doric-js/lib/src/util/resource.d.ts | 2 +- doric-js/lib/src/util/resource.js | 2 +- doric-js/src/util/resource.ts | 2 +- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/doric-demo/src/ImageDemo.ts b/doric-demo/src/ImageDemo.ts index 0d8c127a..0a8105cc 100644 --- a/doric-demo/src/ImageDemo.ts +++ b/doric-demo/src/ImageDemo.ts @@ -1,4 +1,4 @@ -import { Base64Resource, Group, Panel, coordinator, text, gravity, Color, LayoutSpec, log, vlayout, scroller, layoutConfig, image, ScaleType, Image, modal, RemoteResource, MainBundleResource, AndroidAssetsResource, DoricAssetsResource } from "doric"; +import { Base64Resource, Group, Panel, coordinator, text, gravity, Color, LayoutSpec, log, vlayout, scroller, layoutConfig, image, ScaleType, Image, modal, RemoteResource, MainBundleResource, AndroidAssetsResource, AssetsResource } from "doric"; import { colors, label } from "./utils"; import { img_base64 } from "./image_base64"; @@ -6,7 +6,6 @@ const imageUrl = 'https://img.zcool.cn/community/01e75b5da933daa801209e1ffa4649. import logo from "./images/logo_w.png" import button from "./images/button.png" -import { DrawableResource } from "doric/lib/src/util/resource"; @Entry class ImageDemo extends Panel { @@ -32,7 +31,7 @@ class ImageDemo extends Panel { : new MainBundleResource("assets/The_Parthenon_in_Athens.jpeg"), }), image({ - image: new DoricAssetsResource("The_Parthenon_in_Athens.jpeg"), + image: new AssetsResource("The_Parthenon_in_Athens.jpeg"), }), image({ image: new RemoteResource("https://p.upyun.com/demo/webp/webp/jpg-0.webp"), diff --git a/doric-js/bundle/doric-lib.es5.js b/doric-js/bundle/doric-lib.es5.js index 63244cfb..7b5e014d 100644 --- a/doric-js/bundle/doric-lib.es5.js +++ b/doric-js/bundle/doric-lib.es5.js @@ -2180,12 +2180,12 @@ var Base64Resource = /** @class */ (function (_super) { /** * Resources belong to assets dir. */ -var DoricAssetsResource = /** @class */ (function (_super) { - __extends$f(DoricAssetsResource, _super); - function DoricAssetsResource(content) { +var AssetsResource = /** @class */ (function (_super) { + __extends$f(AssetsResource, _super); + function AssetsResource(content) { return _super.call(this, "doric_assets", content) || this; } - return DoricAssetsResource; + return AssetsResource; }(Resource)); var AndroidResource = /** @class */ (function (_super) { __extends$f(AndroidResource, _super); @@ -4525,6 +4525,7 @@ exports.AlphaAnimation = AlphaAnimation; exports.AndroidAssetsResource = AndroidAssetsResource; exports.AndroidResource = AndroidResource; exports.AnimationSet = AnimationSet; +exports.AssetsResource = AssetsResource; exports.BOTTOM = BOTTOM; exports.BackgroundColorAnimation = BackgroundColorAnimation; exports.Base64Resource = Base64Resource; @@ -4534,7 +4535,6 @@ exports.CENTER = CENTER; exports.CENTER_X = CENTER_X; exports.CENTER_Y = CENTER_Y; exports.Color = Color; -exports.DoricAssetsResource = DoricAssetsResource; exports.Draggable = Draggable; exports.DrawableResource = DrawableResource; exports.FlexLayout = FlexLayout; diff --git a/doric-js/bundle/doric-lib.js b/doric-js/bundle/doric-lib.js index 7970f045..773b91c6 100644 --- a/doric-js/bundle/doric-lib.js +++ b/doric-js/bundle/doric-lib.js @@ -1638,7 +1638,7 @@ class Base64Resource extends Resource { /** * Resources belong to assets dir. */ -class DoricAssetsResource extends Resource { +class AssetsResource extends Resource { constructor(content) { super("doric_assets", content); } @@ -3456,6 +3456,7 @@ exports.AlphaAnimation = AlphaAnimation; exports.AndroidAssetsResource = AndroidAssetsResource; exports.AndroidResource = AndroidResource; exports.AnimationSet = AnimationSet; +exports.AssetsResource = AssetsResource; exports.BOTTOM = BOTTOM; exports.BackgroundColorAnimation = BackgroundColorAnimation; exports.Base64Resource = Base64Resource; @@ -3465,7 +3466,6 @@ exports.CENTER = CENTER; exports.CENTER_X = CENTER_X; exports.CENTER_Y = CENTER_Y; exports.Color = Color; -exports.DoricAssetsResource = DoricAssetsResource; exports.Draggable = Draggable; exports.DrawableResource = DrawableResource; exports.FlexLayout = FlexLayout; diff --git a/doric-js/bundle/doric-vm.js b/doric-js/bundle/doric-vm.js index ab97f695..d7a83711 100644 --- a/doric-js/bundle/doric-vm.js +++ b/doric-js/bundle/doric-vm.js @@ -3166,7 +3166,7 @@ class Base64Resource extends Resource { /** * Resources belong to assets dir. */ -class DoricAssetsResource extends Resource { +class AssetsResource extends Resource { constructor(content) { super("doric_assets", content); } @@ -5225,6 +5225,7 @@ exports.AlphaAnimation = AlphaAnimation; exports.AndroidAssetsResource = AndroidAssetsResource; exports.AndroidResource = AndroidResource; exports.AnimationSet = AnimationSet; +exports.AssetsResource = AssetsResource; exports.BOTTOM = BOTTOM; exports.BackgroundColorAnimation = BackgroundColorAnimation; exports.Base64Resource = Base64Resource; @@ -5234,7 +5235,6 @@ exports.CENTER = CENTER; exports.CENTER_X = CENTER_X; exports.CENTER_Y = CENTER_Y; exports.Color = Color; -exports.DoricAssetsResource = DoricAssetsResource; exports.Draggable = Draggable; exports.DrawableResource = DrawableResource; exports.FlexLayout = FlexLayout; diff --git a/doric-js/index.d.ts b/doric-js/index.d.ts index c7a701b6..5ef2c2da 100644 --- a/doric-js/index.d.ts +++ b/doric-js/index.d.ts @@ -1693,7 +1693,7 @@ declare module 'doric/lib/src/util/resource' { /** * Resources belong to assets dir. */ - export class DoricAssetsResource extends Resource { + export class AssetsResource extends Resource { constructor(content: string); } export class AndroidResource extends Resource { diff --git a/doric-js/lib/src/util/resource.d.ts b/doric-js/lib/src/util/resource.d.ts index 56caf665..b4ac34c7 100644 --- a/doric-js/lib/src/util/resource.d.ts +++ b/doric-js/lib/src/util/resource.d.ts @@ -20,7 +20,7 @@ export declare class Base64Resource extends Resource { /** * Resources belong to assets dir. */ -export declare class DoricAssetsResource extends Resource { +export declare class AssetsResource extends Resource { constructor(content: string); } export declare class AndroidResource extends Resource { diff --git a/doric-js/lib/src/util/resource.js b/doric-js/lib/src/util/resource.js index b59f0393..a8725c1a 100644 --- a/doric-js/lib/src/util/resource.js +++ b/doric-js/lib/src/util/resource.js @@ -28,7 +28,7 @@ export class Base64Resource extends Resource { /** * Resources belong to assets dir. */ -export class DoricAssetsResource extends Resource { +export class AssetsResource extends Resource { constructor(content) { super("doric_assets", content); } diff --git a/doric-js/src/util/resource.ts b/doric-js/src/util/resource.ts index aa495a2d..132ca1bd 100644 --- a/doric-js/src/util/resource.ts +++ b/doric-js/src/util/resource.ts @@ -35,7 +35,7 @@ export class Base64Resource extends Resource { /** * Resources belong to assets dir. */ -export class DoricAssetsResource extends Resource { +export class AssetsResource extends Resource { constructor(content: string) { super("doric_assets", content) }