Skip to content

Commit

Permalink
➕ Move to TypeScript (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
frinyvonnick authored Feb 6, 2022
1 parent bbf8002 commit d1d08cd
Show file tree
Hide file tree
Showing 24 changed files with 2,099 additions and 579 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
};
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ typings/
eng.traineddata

.DS_Store

dist
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2021 Yvonnick Frin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
],
};
7 changes: 0 additions & 7 deletions example.js

This file was deleted.

Binary file removed image.png
Binary file not shown.
67 changes: 0 additions & 67 deletions index.html

This file was deleted.

81 changes: 0 additions & 81 deletions issue-reproduce.js

This file was deleted.

22 changes: 18 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "node-html-to-image",
"version": "3.2.0",
"description": "A Node.js library that generates images from HTML",
"main": "src/index.js",
"types": "types/index.d.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "git@github.com:frinyvonnick/node-html-to-image.git",
"author": "FRIN Yvonnick <frin.yvonnick@gmail.com>",
"license": "Apache-2.0",
Expand All @@ -13,18 +13,32 @@
"puppeteer-cluster": "^0.21.0"
},
"scripts": {
"test": "jest"
"test": "jest",
"lint": "eslint ./src",
"build": "tsc"
},
"files": [
"src",
"types",
"!src/*.spec.js"
],
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"@babel/preset-typescript": "^7.16.0",
"@types/handlebars": "^4.1.0",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.6",
"@types/puppeteer": "^5.4.4",
"@types/puppeteer-core": "^5.4.0",
"@typescript-eslint/eslint-plugin": "^5.3.1",
"@typescript-eslint/parser": "^5.3.1",
"eslint": "^8.2.0",
"gitmoji-changelog": "^2.1.0",
"jest": "^26.1.0",
"jest-circus": "^26.1.0",
"rimraf": "^3.0.2",
"tesseract.js": "^2.0.1"
"tesseract.js": "^2.0.1",
"typescript": "^4.4.4"
}
}
50 changes: 0 additions & 50 deletions src/index.js

This file was deleted.

Loading

0 comments on commit d1d08cd

Please sign in to comment.