-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Showing
18 changed files
with
177 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
node_modules/ | ||
coverage/ | ||
packages/*/*.d.ts | ||
.DS_Store | ||
*.log | ||
node_modules | ||
coverage | ||
*.d.ts | ||
yarn.lock |
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,8 +1,16 @@ | ||
/** | ||
* @typedef {import('unified').Plugin<[]>} Plugin | ||
*/ | ||
|
||
import {unherit} from 'unherit' | ||
import {ParseDutch} from 'parse-dutch' | ||
// @ts-expect-error: untyped. | ||
import {ParseDutch as Parser} from 'parse-dutch' | ||
|
||
export {ParseDutch as Parser} | ||
// Untyped. | ||
// type-coverage:ignore-next-line | ||
export {Parser} | ||
|
||
/** @type {Plugin} */ | ||
export default function retextDutch() { | ||
this.Parser = unherit(ParseDutch) | ||
Object.assign(this, {Parser: unherit(Parser)}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["*.js"] | ||
} |
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,8 +1,16 @@ | ||
/** | ||
* @typedef {import('unified').Plugin<[]>} Plugin | ||
*/ | ||
|
||
import {unherit} from 'unherit' | ||
import {ParseEnglish} from 'parse-english' | ||
// @ts-expect-error: untyped. | ||
import {ParseEnglish as Parser} from 'parse-english' | ||
|
||
export {ParseEnglish as Parser} | ||
// Untyped. | ||
// type-coverage:ignore-next-line | ||
export {Parser} | ||
|
||
/** @type {Plugin} */ | ||
export default function retextEnglish() { | ||
this.Parser = unherit(ParseEnglish) | ||
Object.assign(this, {Parser: unherit(Parser)}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["*.js"] | ||
} |
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,8 +1,16 @@ | ||
/** | ||
* @typedef {import('unified').Plugin<[]>} Plugin | ||
*/ | ||
|
||
import {unherit} from 'unherit' | ||
import {ParseLatin} from 'parse-latin' | ||
// @ts-expect-error: untyped. | ||
import {ParseLatin as Parser} from 'parse-latin' | ||
|
||
export {ParseLatin as Parser} | ||
// Untyped. | ||
// type-coverage:ignore-next-line | ||
export {Parser} | ||
|
||
/** @type {Plugin} */ | ||
export default function retextLatin() { | ||
this.Parser = unherit(ParseLatin) | ||
Object.assign(this, {Parser: unherit(Parser)}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["*.js"] | ||
} |
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,9 +1,19 @@ | ||
/** | ||
* @typedef {import('unified').Plugin<[]>} Plugin | ||
* @typedef {import('unist').Node} Node | ||
*/ | ||
|
||
import {toString} from 'nlcst-to-string' | ||
|
||
/** @type {Plugin} */ | ||
export default function retextStringify() { | ||
this.Compiler = compiler | ||
Object.assign(this, {Compiler}) | ||
} | ||
|
||
function compiler(tree) { | ||
/** | ||
* @param {Node} tree | ||
* @returns {string} | ||
*/ | ||
function Compiler(tree) { | ||
return toString(tree) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["*.js"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"include": ["*.js"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"include": ["*.js"], | ||
"compilerOptions": { | ||
"target": "ES2020", | ||
"lib": ["ES2020"], | ||
"module": "ES2020", | ||
"moduleResolution": "node", | ||
"allowJs": true, | ||
"checkJs": true, | ||
"declaration": true, | ||
"emitDeclarationOnly": true, | ||
"allowSyntheticDefaultImports": true, | ||
"skipLibCheck": true, | ||
"strict": true | ||
} | ||
} |