asljs-appbase
v0.1.5
Published
The base of the applications: configuration files and state folders, the entry point of an executable, markdown, the document server and editor applications.
Readme
appbase
Part of Alexandrite Software Library - a set of high-quality, performant JavaScript libraries and tools for everyday use.
The base the applications of this repository are built on: their configuration files and state folders, the entry point of an executable, markdown, and serving documents and editor applications in a browser.
Overview
The applications - rq, kb, part, cog, board, dash and the tools -
share these parts:
- Configuration - read an application's
<app>.json, and find the folder it keeps its state in,.<app>. - Executables - the logging options, errors and exit codes of a command line, a web server or an MCP server.
- Editor applications - an application served as a plugin of the editor, with a project per configuration file, alone or with the others.
- Markdown - parse a document, read a section, plain text and local links.
- Files - find the markdown files of a folder.
- Post-processing - remember the files a command wrote, and run the project's formatter on them, named in the tool's configuration file.
- Server - serve a folder's data: its files as they are, markdown as its text, and JSON values, on the first free port from 3000; the page renders them.
Scope
- Node.js, ES modules.
- The server is for local use: it serves every file inside its folder, and renders nothing.
Installation
npm install asljs-appbaseUsage
import { getSection,
parseMarkdown,
plainText }
from 'asljs-appbase';
const root =
parseMarkdown('# R1 Export\n\n## Implementation\n\n- [T1](<tests/T1 PDF.md>)\n');
const items =
getSection(
root,
'Implementation')
?.map(plainText);
console.log(items);Further reading
- appbase - every export.
Related packages
asljs-cmdbasereads the configuration file and starts an executable; this package re-exports it.asljs-rqmanages requirements in markdown, andasljs-rq-srvshows them with this package's server.asljs-boardkeeps a planning board in markdown, andasljs-board-srvshows it with this package's server.asljs-kbmanages a markdown knowledge base, andasljs-kb-srvshows it with this package's server.asljs-mcpserves a tool's commands over MCP.
License
MIT
