Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"version": "0.2.0",
"version": "0.3.0",
"configurations": [
{
"type": "node-terminal",
"name": "Run Script: test",
"request": "launch",
"command": "npm run test",
"cwd": "${workspaceFolder}"
},
{
"type": "node-terminal",
"name": "Run Script: debug",
"request": "launch",
"command": "npm run debug",
"cwd": "${workspaceFolder}"
}
]
}
4 changes: 2 additions & 2 deletions example/example-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
const fs = require('fs');
// FIXME: Incase you have the npm package
// const HTMLtoDOCX = require('html-to-docx');
const HTMLtoDOCX = require('../dist/html-to-docx.umd');
import HTMLtoDOCX from '../index';

const filePath = './example.docx';

const htmlString = `<!DOCTYPE html>
const htmlString = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
48 changes: 41 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"main": "dist/html-to-docx.umd.js",
"module": "dist/html-to-docx.esm.js",
"scripts": {
"test": "npm run build && node example/example-node.js",
"test": "npm run build && node -r esm example/example-node.js",
"debug": "node -r esm example/example-node.js",
"release": "standard-version",
"lint": "eslint --fix .",
"prettier:check": "prettier --check '**/*.{js}'",
Expand Down Expand Up @@ -63,6 +64,7 @@
"dependencies": {
"color-name": "^1.1.4",
"escape-html": "^1.0.3",
"esm": "^3.2.25",
"html-to-vdom": "^0.7.0",
"image-size": "^1.0.0",
"image-to-base64": "^2.2.0",
Expand Down