Skip to content

Commit

Permalink
Dovetail 4 NBT
Browse files Browse the repository at this point in the history
Deciding not to pursue NBT editing for STE. I already have Dovetail going for that, and adding NBT editing to STE would have been for if I hadn't pursued the development of Dovetail.

Was doing some regular old code-surfing for ideas, how have I not heard that you can alias npm packages when you install them??
https://stackoverflow.com/questions/56134857/how-to-install-npm-package-under-alias-or-different-name

Trying out Modern Dark again for my VSCode theme tonight, I'm starting to like it :)
  • Loading branch information
Offroaders123 committed Jul 11, 2023
1 parent 90ae22e commit ef5f103
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
8 changes: 1 addition & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
},
"dependencies": {
"@stedit/menu-drop": "^1.0.1",
"@stedit/num-text": "^1.0.1",
"nbtify": "^1.60.2"
"@stedit/num-text": "^1.0.1"
},
"devDependencies": {
"@types/prismjs": "^1.26.0",
Expand Down
2 changes: 1 addition & 1 deletion public/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var self = /** @type { ServiceWorkerGlobalScope } */ (/** @type { unknown } */ (globalThis));

const NAME = "Smart Text Editor";
const VERSION = "v4.27.1";
const VERSION = "v4.27.2";
const CACHE_NAME = /** @type { const } */ (`${NAME} ${VERSION}`);

const IS_MACOS_DEVICE = (/(macOS|Mac)/i.test(navigator.userAgentData?.platform ?? navigator.platform) && navigator.standalone === undefined);
Expand Down
3 changes: 1 addition & 2 deletions src/Workspace.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import STE from "./STE.js";
import Editor from "./Editor.js";
import { workspace, view_menu, scaler, preview, preview_menu, workspace_tabs, header, getElementStyle } from "./dom.js";
import { read, stringify } from "nbtify";

import type { EditorOptions } from "./Editor.js";

Expand Down Expand Up @@ -149,7 +148,7 @@ export async function openFiles(): Promise<void> {

const results: PromiseSettledResult<EditorOptions>[] = await Promise.allSettled([...input.files].map(async file => {
const { name } = file;
const value = (name.match(/.(nbt|dat)$/)) ? await file.arrayBuffer().then(read).then(({ data }) => stringify(data,{ space: 2 })) : await file.text();
const value = await file.text();
return { name, value };
}));

Expand Down

0 comments on commit ef5f103

Please sign in to comment.