@rokelamen/md2html 0.1.0 → 0.1.2

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/dist/index.js CHANGED
@@ -1,11 +1,7 @@
1
- #!/usr/bin/env node
2
- import { program } from 'commander';
3
- function main() {
4
- program
5
- .version('0.1.0')
6
- .option('-n, --name <string>', 'your name', 'world')
7
- .parse(process.argv);
8
- const { name } = program.opts();
9
- console.log(`hello, ${name}`);
1
+ /* The main parse logic */
2
+ function parse(content) {
3
+ const source = content.trim();
4
+ return `<p>${source}</p>`;
10
5
  }
11
- main();
6
+
7
+ export { parse };
package/package.json CHANGED
@@ -1,32 +1,45 @@
1
1
  {
2
2
  "name": "@rokelamen/md2html",
3
- "version": "0.1.0",
4
- "description": "",
5
- "main": "dist/index.js",
6
3
  "type": "module",
4
+ "version": "0.1.2",
5
+ "description": "A simple tool to convert markdown content to html",
6
+ "author": "rokelamen <rogerskelamen@gmail.com>",
7
+ "license": "MIT",
8
+ "main": "./dist/index.js",
7
9
  "bin": {
8
- "md2html-cli": "./dist/index.js"
10
+ "md2html": "./bin/cli.cjs"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ }
9
17
  },
10
18
  "scripts": {
11
- "clean": "rimraf dist",
12
- "build": "npm run clean && tsc",
13
- "dev": "ts-node src/index.ts",
19
+ "clean": "rimraf bin dist",
20
+ "build": "npm run clean && rollup -c rollup.config.ts --configPlugin typescript",
21
+ "test": "node bin/cli.cjs",
14
22
  "prepublishOnly": "npm run build"
15
23
  },
16
24
  "files": [
25
+ "bin",
17
26
  "dist"
18
27
  ],
19
- "keywords": ["cli", "typescript", "md2html"],
20
- "author": "rokelamen <rogerskelamen@gmail.com>",
21
- "license": "MIT",
28
+ "keywords": [
29
+ "cli",
30
+ "typescript",
31
+ "md2html"
32
+ ],
22
33
  "devDependencies": {
34
+ "@rollup/plugin-commonjs": "^29.0.0",
35
+ "@rollup/plugin-node-resolve": "^16.0.3",
36
+ "@rollup/plugin-typescript": "^12.3.0",
23
37
  "@types/commander": "^2.12.0",
24
38
  "@types/node": "^25.0.3",
39
+ "commander": "^14.0.2",
25
40
  "rimraf": "^6.1.2",
26
- "ts-node": "^10.9.2",
41
+ "rollup": "^4.54.0",
42
+ "tslib": "^2.8.1",
27
43
  "typescript": "^5.9.3"
28
- },
29
- "dependencies": {
30
- "commander": "^14.0.2"
31
44
  }
32
45
  }