2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-05-15 11:59:37 +03:00
Files
bbob/packages/bbob-react
Long Nguyen 0edd490a24 fix: proper module resolution in all cases (Node CJS, Node ESM, bundler)
* 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
2025-08-18 19:13:22 +02:00
..
2024-11-26 12:11:20 +02:00
2024-04-23 21:11:14 +02:00
2024-04-23 21:11:14 +02:00
2024-04-23 21:11:14 +02:00
2021-11-29 00:33:06 +02:00
2023-10-23 13:21:56 +02:00
2024-04-23 21:11:14 +02:00

@bbob/react

install size Known Vulnerabilities

Converts @bbob/parser AST tree to React

npm i @bbob/react @bbob/preset-react
import React from 'react'
import BBCode from '@bbob/react';
import presetReact from '@bbob/preset-react';

const plugins = [presetReact()];

export default () => (
    <BBCode plugins={plugins}>
    [table]
      [tr]
          [td]table 1[/td]
          [td]table 2[/td]
      [/tr]
      [tr]
          [td]table 3[/td]
          [td]table 4[/td]
      [/tr]
    [/table]
    </BBCode>
)
import { render } from '@bbob/react'

export default () => render(`
[table]
  [tr]
      [td]table 1[/td]
      [td]table 2[/td]
  [/tr]
  [tr]
      [td]table 3[/td]
      [td]table 4[/td]
  [/tr]
[/table]
`)