From 59c1a1f4018f29b6e108e9807ab4f5f8ff43762a Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 2 Aug 2021 17:18:00 -0700 Subject: [PATCH] Add a configuration file and 'migrate' deserialize to TS --- snowpack.config.js | 35 +++++++++++++++++++ .../{deserialize.js => deserialize.ts} | 0 .../session/room/timeline/tiles/TextTile.js | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 snowpack.config.js rename src/domain/session/room/timeline/{deserialize.js => deserialize.ts} (100%) diff --git a/snowpack.config.js b/snowpack.config.js new file mode 100644 index 00000000..b4fd3b70 --- /dev/null +++ b/snowpack.config.js @@ -0,0 +1,35 @@ +// Snowpack Configuration File +// See all supported options: https://www.snowpack.dev/reference/configuration + +/** @type {import("snowpack").SnowpackUserConfig } */ +module.exports = { + mount: { + "src": "/src", + "public": "/", + "lib": {url: "/lib", static: true }, + /* ... */ + }, + exclude: [ + /* Avoid scanning scripts which use dev-dependencies and pull in babel, rollup, etc. */ + '**/node_modules/**/*', '**/scripts/**', '**/target/**', '**/prototypes/**' + ], + plugins: [ + /* ... */ + ], + packageOptions: { + /* ... */ + external: [ + /* Olm seems to import these but not use them. */ + "path", + "crypto", + "fs", + ], + }, + devOptions: { + open: "none", + /* ... */ + }, + buildOptions: { + /* ... */ + }, +}; diff --git a/src/domain/session/room/timeline/deserialize.js b/src/domain/session/room/timeline/deserialize.ts similarity index 100% rename from src/domain/session/room/timeline/deserialize.js rename to src/domain/session/room/timeline/deserialize.ts diff --git a/src/domain/session/room/timeline/tiles/TextTile.js b/src/domain/session/room/timeline/tiles/TextTile.js index ffd06c1a..10aca813 100644 --- a/src/domain/session/room/timeline/tiles/TextTile.js +++ b/src/domain/session/room/timeline/tiles/TextTile.js @@ -16,7 +16,7 @@ limitations under the License. import {BaseTextTile, BodyFormat} from "./BaseTextTile.js"; import {parsePlainBody} from "../MessageBody.js"; -import {parseHTMLBody} from "../deserialize.js"; +import {parseHTMLBody} from "../deserialize.ts"; export class TextTile extends BaseTextTile { _getContentString(key) {