forked from orgapp/orgajs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xiaoxing Hu
committed
Aug 10, 2020
1 parent
c50535c
commit 304f417
Showing
11 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#+TITLE: orga-unified-parse | ||
|
||
Parser for unified. Parses org-mode to oast syntax trees. | ||
Parser for [[https://github.com/unifiedjs/unified][unified]]. Parses org-mode to oast syntax trees. Used in [[https://github.com/orgapp/orgajs/tree/master/packages/orga-unified][orga-unified]] processor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,8 @@ | |
}, | ||
"dependencies": { | ||
"orga": "^2.0.0-next.1" | ||
}, | ||
"devDependencies": { | ||
"unified": "^9.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import { parse, ParseOptions } from 'orga' | ||
import { Plugin } from 'unified' | ||
|
||
export = function (options: Partial<ParseOptions>) { | ||
|
||
const _parse: Plugin = function(options: Partial<ParseOptions>) { | ||
this.Parser = (doc: string, file) => { | ||
return parse(doc, options) | ||
} | ||
} | ||
|
||
export = _parse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#+TITLE: orga-unified | ||
|
||
[[https://github.com/unifiedjs/unified][unified]] processor to parse [[https://orgmode.org][org-mode]]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "orga-unified", | ||
"version": "2.0.0-next.1", | ||
"description": "orga processor for unifiedjs", | ||
"files": [ | ||
"lib" | ||
], | ||
"main": "lib/index.js", | ||
"author": "Xiaoxing Hu <[email protected]>", | ||
"license": "MIT", | ||
"repository": "https://github.com/orgapp/orgajs/tree/master/packages/orga-unified", | ||
"scripts": { | ||
"build": "npm run clean && npm run compile", | ||
"compile": "tsc -p tsconfig.build.json", | ||
"compile:watch": "tsc -w -p tsconfig.build.json", | ||
"prepare": "cross-env NODE_ENV=production npm run build", | ||
"clean": "rm -rf ./lib" | ||
}, | ||
"dependencies": { | ||
"orga-unified-parse": "^2.0.0-next.1", | ||
"unified": "^9.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import unified from 'unified' | ||
import parse from 'orga-unified-parse' | ||
|
||
export = unified().use(parse).freeze() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.build.json", | ||
"compilerOptions": { | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"], | ||
"exclude": ["**/__tests__/**"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "./lib" | ||
}, | ||
"include": ["./src"], | ||
"exclude": ["**/__tests__/**"] | ||
} |