Skip to content

Commit

Permalink
Refactor to move code to lib/
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 22, 2023
1 parent bcf4a56 commit 486f000
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
16 changes: 1 addition & 15 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
/**
* @typedef {import('mdast').Root} Root
*/

import {newlineToBreak} from 'mdast-util-newline-to-break'

/**
* Plugin to support hard breaks without needing spaces or escapes (turns enters
* into `<br>`s).
*
* @type {import('unified').Plugin<void[], Root>}
*/
export default function remarkBreaks() {
return newlineToBreak
}
export {default} from './lib/index.js'
15 changes: 15 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* @typedef {import('mdast').Root} Root
*/

import {newlineToBreak} from 'mdast-util-newline-to-break'

/**
* Plugin to support hard breaks without needing spaces or escapes (turns enters
* into `<br>`s).
*
* @type {import('unified').Plugin<void[], Root>}
*/
export default function remarkBreaks() {
return newlineToBreak
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"main": "index.js",
"types": "index.d.ts",
"files": [
"lib/",
"index.d.ts",
"index.js"
],
Expand Down

0 comments on commit 486f000

Please sign in to comment.