2020-01-30 03:25:32 +00:00
|
|
|
# mfm-parser-pegjs
|
2020-01-31 19:29:30 +00:00
|
|
|
## Description
|
2020-02-16 14:27:25 +00:00
|
|
|
A MFM parser made with PEG.js (In developing)
|
2020-01-31 19:29:30 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
```
|
2020-02-16 14:27:25 +00:00
|
|
|
npm i mfm-parser-pegjs
|
2020-01-31 19:29:30 +00:00
|
|
|
```
|
|
|
|
|
2020-02-16 14:27:25 +00:00
|
|
|
## Usage
|
|
|
|
```ts
|
|
|
|
import { parse } from 'mfm-parser-pegjs';
|
|
|
|
|
|
|
|
// parse a MFM code
|
|
|
|
const result = parse('this is a ***MFM text***');
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage (Repository)
|
|
|
|
### 1. Clone
|
|
|
|
```
|
|
|
|
git clone https://github.com/marihachi/mfm-parser-pegjs.git
|
|
|
|
```
|
|
|
|
|
|
|
|
### 2. Build
|
2020-01-31 19:29:30 +00:00
|
|
|
For production:
|
|
|
|
```
|
|
|
|
npm run build
|
|
|
|
```
|
|
|
|
|
|
|
|
For development:
|
|
|
|
```
|
|
|
|
npm run build-dev
|
|
|
|
```
|
|
|
|
|
2020-02-16 14:27:25 +00:00
|
|
|
### Use Interactive interface
|
2020-01-31 19:29:30 +00:00
|
|
|
```
|
2020-02-16 14:27:25 +00:00
|
|
|
npm parse
|
2020-01-31 19:29:30 +00:00
|
|
|
```
|
2020-02-16 14:27:25 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
MIT
|