Release first npm package
Just released a npm package, you can find the source files here: markable.
Get started
package: Markable
Init
1
2
3
md markable
cd markable
npm init
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"name": "markable",
"version": "0.0.0",
"description": "Make non-English Markdown plain text markable",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/guxi11/markable.git"
},
"keywords": [
"markdown",
"markup",
"html"
],
"author": {
"name": "Guxi11"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/guxi11/markable/issues"
},
"homepage": "https://github.com/guxi11/markable#readme"
}
Add index.js
1
2
3
4
module.exports = function markable(text) {
if (typeof text !== "string") throw new TypeError("Markable wants a string!");
return text.replace(/》 /g, "> ").replace(/···/g, "```");
};
Add readme
Add License
- Find a GitHub repo and copy a MIT
Publish
1
npm publish --access=public
Further version
Add badge
-
heavily inspired by marked
1
[![npm](https://badgen.net/npm/v/marked)](https://www.npmjs.com/package/marked)
-
https://badgen.net for npm
-
https://shields.io
References
tutorial
issues: