mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-05 16:42:27 +03:00
0edd490a24
* Add extensions to all imports * Set module resolution to `bundler` to avoid Node specific behavior * Use `ts2mjs` to rename files to `mjs` * Add extensions to `@bbob/types` imports * Fix `package.json` for proper ESM extension and type separation * More module resolution stuff change (`node16` for everything, `node` for Vue 2 plugin) * Use `ts-jest-resolver` for `js` -> `ts` resolving in Jest * Add changeset * Add import extensions to frontend libs
#@bbob/preset Base function for create presets to process bbcode AST to HTML or Framework specific tags
Install
npm i @bbob/preset
API
For plain HTML
import { createPreset } from '@bbob/core'
import { createPreset } from '@bbob/preset'
const options = {
onlyAllowTags: ['url', 'h'],
onError: (err) => console.warn(err.message, err.lineNumber, err.columnNumber)
};
const pre = parse('[url=https://github.com]hello world![/url]', options)