svelte-markdown
Advanced tools
Comparing version 0.0.2 to 0.0.3
{ | ||
"name": "svelte-markdown", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "dist/sveltemarkdown.js", | ||
@@ -18,14 +18,16 @@ "module": "dist/sveltemarkdown.es.js", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "11.0.2", | ||
"@rollup/plugin-node-resolve": "^7.0.0", | ||
"rollup": "^1.20.0", | ||
"rollup-plugin-analyzer": "^3.2.2", | ||
"@rollup/plugin-commonjs": "16.0.0", | ||
"@rollup/plugin-node-resolve": "^10.0.0", | ||
"eslint": "^7.14.0", | ||
"eslint-plugin-svelte3": "^2.7.3", | ||
"rollup": "^2.33.3", | ||
"rollup-plugin-analyzer": "^3.3.0", | ||
"rollup-plugin-bundle-size": "^1.0.3", | ||
"rollup-plugin-svelte": "^5.0.3", | ||
"rollup-plugin-terser": "^5.1.2", | ||
"sirv-cli": "^0.4.4", | ||
"svelte": "^3.0.0" | ||
"rollup-plugin-svelte": "^6.1.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"sirv-cli": "^1.0.8", | ||
"svelte": "^3.29.7" | ||
}, | ||
"dependencies": { | ||
"marked": "^1.0.0" | ||
"marked": "^1.2.5" | ||
}, | ||
@@ -32,0 +34,0 @@ "peerDependencies": { |
# Svelte Markdown | ||
A markdown parser that renders into Svelte Components. Inspired by ReactMarkdown and probably really inefficient. | ||
A markdown parser that renders into Svelte Components. Inspired by [ReactMarkdown](https://github.com/remarkjs/react-markdown). | ||
@@ -26,3 +26,3 @@ ## Installation | ||
import SvelteMarkdown from 'svelte-markdown' | ||
const source = ' | ||
const source = ` | ||
# This is a header | ||
@@ -41,3 +41,3 @@ | ||
|-------------|---------| | ||
| With two | columns |' | ||
| With two | columns |` | ||
</script> | ||
@@ -88,3 +88,4 @@ | ||
* `source` - *string* The Markdown source to be parsed. | ||
* `renderers` - *object* An object where the keys represent a node type and the value is a Svelte component. This object will be merged with the default renderers. For now you can check how the default renderers are written in the source code at `src/renderers`. | ||
* `renderers` - *object (optional)* An object where the keys represent a node type and the value is a Svelte component. This object will be merged with the default renderers. For now you can check how the default renderers are written in the source code at `src/renderers`. | ||
* `options` - *object (optional)* An object containing [options for Marked](https://marked.js.org/using_advanced#options) | ||
@@ -116,6 +117,2 @@ ## Available renderers | ||
## Disclaimer | ||
I've literally only worked on this for like 10 hours as of writing the readme. It's not optimized, probably inefficient and still not so configurable. It doesn't yet provide a way to sanitize HTML. | ||
## Developing | ||
@@ -142,1 +139,7 @@ | ||
As of now the only external dependency of this project is `marked`. | ||
## Related | ||
- [ReactMarkdown](https://github.com/remarkjs/react-markdown) - React library to render markdown using React components. Inspiration for this library. | ||
- [Svelte](https://svelte.dev) - JavaScript front-end framework. | ||
- [Marked](https://marked.js.org/) - Markdown parser |
@@ -1,3 +0,3 @@ | ||
import SvelteMarkdown from './SvelteMarkdown.svelte'; | ||
import SvelteMarkdown from './SvelteMarkdown.svelte' | ||
export default SvelteMarkdown; | ||
export default SvelteMarkdown |
@@ -1,20 +0,20 @@ | ||
export { default as Heading } from './Heading.svelte'; | ||
export { default as Paragraph } from './Paragraph.svelte'; | ||
export { default as Text } from './Text.svelte'; | ||
export { default as Image } from './Image.svelte'; | ||
export { default as Link } from './Link.svelte'; | ||
export { default as Em } from './Em.svelte'; | ||
export { default as Del } from './Del.svelte'; | ||
export { default as Codespan } from './Codespan.svelte'; | ||
export { default as Strong } from './Strong.svelte'; | ||
export { default as Table } from './Table.svelte'; | ||
export { default as TableHead } from './TableHead.svelte'; | ||
export { default as TableBody } from './TableBody.svelte'; | ||
export { default as TableRow } from './TableRow.svelte'; | ||
export { default as TableCell } from './TableCell.svelte'; | ||
export { default as List } from './List.svelte'; | ||
export { default as ListItem } from './ListItem.svelte'; | ||
export { default as Hr } from './Hr.svelte'; | ||
export { default as Html } from './Html.svelte'; | ||
export { default as Blockquote } from './Blockquote.svelte'; | ||
export { default as Code } from './Code.svelte'; | ||
export { default as Heading } from './Heading.svelte' | ||
export { default as Paragraph } from './Paragraph.svelte' | ||
export { default as Text } from './Text.svelte' | ||
export { default as Image } from './Image.svelte' | ||
export { default as Link } from './Link.svelte' | ||
export { default as Em } from './Em.svelte' | ||
export { default as Del } from './Del.svelte' | ||
export { default as Codespan } from './Codespan.svelte' | ||
export { default as Strong } from './Strong.svelte' | ||
export { default as Table } from './Table.svelte' | ||
export { default as TableHead } from './TableHead.svelte' | ||
export { default as TableBody } from './TableBody.svelte' | ||
export { default as TableRow } from './TableRow.svelte' | ||
export { default as TableCell } from './TableCell.svelte' | ||
export { default as List } from './List.svelte' | ||
export { default as ListItem } from './ListItem.svelte' | ||
export { default as Hr } from './Hr.svelte' | ||
export { default as Html } from './Html.svelte' | ||
export { default as Blockquote } from './Blockquote.svelte' | ||
export { default as Code } from './Code.svelte' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
952082
14722
141
11
Updatedmarked@^1.2.5