1
0
This commit is contained in:
Zef Hemel
2022-08-01 18:27:50 +02:00
parent 538ae95dc4
commit b29b175b40
12 changed files with 35 additions and 29 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.0.1",
@@ -4,6 +4,6 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT"
}
+1 -1
View File
@@ -4,6 +4,6 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT"
}
+1 -1
View File
@@ -4,7 +4,7 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT",
"bin": {
"plugos-bundle": "./dist/plugos/plugos-bundle.js",
+1
View File
@@ -21,6 +21,7 @@ export async function editorInit() {
let spaceIndexed = await get("$spaceIndexed");
console.log("Space indexed", spaceIndexed);
if (!spaceIndexed) {
await set("$spaceIndexed", true);
await invokeFunction("client", "reindexSpaceCommand");
// Resetting this, because part of the reindex will be to wipe this too
await set("$silverBulletVersion", currentVersion);
+5 -1
View File
@@ -2,6 +2,7 @@ import {
flashNotification,
getText,
} from "@silverbulletmd/plugos-silverbullet-syscall/editor";
import { listPages } from "@silverbulletmd/plugos-silverbullet-syscall/space";
function countWords(str: string): number {
const matches = str.match(/[\w\d\'-]+/gi);
@@ -15,7 +16,10 @@ function readingTime(wordCount: number): number {
export async function statsCommand() {
const text = await getText();
const allPages = await listPages();
const wordCount = countWords(text);
const time = readingTime(wordCount);
await flashNotification(`${wordCount} words, ${time} minutes to read.`);
await flashNotification(
`${wordCount} words; ${time} minutes read; ${allPages.length} total pages in space.`
);
}
+2 -2
View File
@@ -4,7 +4,7 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT",
"scripts": {
"generate": "lezer-generator query/query.grammar -o query/parse-query.js",
@@ -34,7 +34,7 @@
"@jest/globals": "^27.5.1",
"@lezer/generator": "1.0.0",
"@lezer/lr": "1.0.0",
"@silverbulletmd/common": "^0.0.28",
"@silverbulletmd/common": "^0.0.29",
"@types/yaml": "^1.9.7",
"handlebars": "^4.7.7",
"markdown-it": "^12.3.2",
+4 -4
View File
@@ -4,7 +4,7 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT",
"bin": {
"silverbullet": "./dist/server/server.js"
@@ -39,9 +39,9 @@
"@codemirror/legacy-modes": "6.0.0",
"@jest/globals": "^27.5.1",
"@lezer/markdown": "1.0.1",
"@silverbulletmd/common": "^0.0.28",
"@silverbulletmd/plugs": "^0.0.28",
"@silverbulletmd/web": "^0.0.28",
"@silverbulletmd/common": "^0.0.29",
"@silverbulletmd/plugs": "^0.0.29",
"@silverbulletmd/web": "^0.0.29",
"better-sqlite3": "^7.5.0",
"body-parser": "^1.19.2",
"buffer": "^6.0.3",
+1 -1
View File
@@ -4,7 +4,7 @@
"name": "Zef Hemel",
"email": "zef@zef.me"
},
"version": "0.0.28",
"version": "0.0.29",
"license": "MIT",
"scripts": {
"watch": "rm -rf .parcel-cache && parcel watch",