@raspberrypifoundation/rpf-markdown-core 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # rpf-markdown
2
+
3
+ JS library to parse markdown and return HTML
4
+
5
+ Installation:
6
+ Currently the library is not published anywhere. Follow these steps to install locally:
7
+
8
+ 1. Pull this repository
9
+ 2. Run `yarn build`
10
+ 3. Run `yarn pack` - This will create a file called `rpf-markdown-core-v1.0.0.tgz`
11
+ 4. Copy this file into the repo you want to install at.
12
+ 5. Run `yarn install <path-to-tgz-file>` to install in the target repo.
13
+
14
+ Current features:
15
+
16
+ - Code blocks formatted using prism JS
17
+ - projects site custom blocks like task, tip and debug
18
+ - scratchblocks
19
+ - Raspberry Flavoured Markdown as outlined in this [spec](https://digital-docs.rpf-internal.org/docs/technology/codebases-and-products/raspberry-flavoured-markdown/specs/raspberry-flavoured-markdown-draft-spec)
20
+
21
+ Example usage:
22
+
23
+ ```javascript
24
+ import { processEditorProject } from "rpf-markdown-core";
25
+
26
+ const exampleMarkdown = `# Hello World`;
27
+
28
+ // processEditorProject returns the HTML for the markdown passed into it.
29
+ const htmlOutput = processEditorProject(exampleMarkdown);
30
+ ```
31
+
32
+ ## Releasing a new version
33
+
34
+ 1. Create a new PR to bump the version in `package.json`
35
+ 2. Merge the PR
36
+ 3. Create a new Release with a new tag matching the version in `package.json`
37
+ 4. New version of package should be published automatically