Skip to content

Commit 3c24803

Browse files
Merge pull request #12 from AndrewLeedham/master
refactor(types): move to root
2 parents 37a09da + 851e702 commit 3c24803

File tree

12 files changed

+40
-26
lines changed

12 files changed

+40
-26
lines changed

β€Ž.npmrcβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-exact=true
2+
package-lock=false
File renamed without changes.

β€Žtypes/lib/domparser.d.tsβ€Ž renamed to β€Žlib/domparser.d.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TypeScript Version: 3.3
2+
13
/**
24
* Parses HTML string to DOM nodes.
35
*

β€Žtypes/lib/html-to-dom-client.d.tsβ€Ž renamed to β€Žlib/html-to-dom-client.d.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TypeScript Version: 3.3
2+
13
import { DomElement } from 'domhandler';
24

35
/**

β€Žtypes/lib/html-to-dom-server.d.tsβ€Ž renamed to β€Žlib/html-to-dom-server.d.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TypeScript Version: 3.3
2+
13
import { DomHandlerOptions, DomElement } from 'domhandler';
24

35
/**

β€Žtypes/lib/utilities.d.tsβ€Ž renamed to β€Žlib/utilities.d.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// TypeScript Version: 3.3
2+
13
import { DomElement } from 'domhandler';
24

35
/**

β€Žpackage.jsonβ€Ž

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@
44
"description": "An HTML to DOM parser that works on the server and client.",
55
"author": "Mark <mark@remarkablemark.org>",
66
"main": "index.js",
7-
"types": "types",
87
"scripts": {
98
"build": "npm run build:min && npm run build:unmin",
109
"build:min": "webpack index.js dist/html-dom-parser.min.js -p --output-library HTMLDOMParser --output-library-target umd",
1110
"build:unmin": "webpack index.js dist/html-dom-parser.js --output-library HTMLDOMParser --output-library-target umd",
1211
"clean": "rm -rf dist",
12+
"test": "mocha",
13+
"lint": "eslint . --ignore-path .gitignore",
14+
"dtslint": "dtslint .",
1315
"cover": "istanbul cover _mocha -- -R spec",
1416
"coveralls": "cat coverage/lcov.info | coveralls",
15-
"dtslint": "dtslint types",
16-
"lint": "eslint . --ignore-path .gitignore",
1717
"prepublish": "npm run clean && npm run build",
18-
"release": "standard-version --no-verify",
19-
"test": "mocha"
18+
"release": "standard-version --no-verify"
2019
},
2120
"repository": {
2221
"type": "git",
@@ -32,11 +31,11 @@
3231
"htmlparser2"
3332
],
3433
"dependencies": {
34+
"@types/domhandler": "2.4.1",
3535
"domhandler": "2.3.0",
3636
"htmlparser2": "3.9.1"
3737
},
3838
"devDependencies": {
39-
"@types/domhandler": "^2.4.1",
4039
"chai": "^3.5.0",
4140
"coveralls": "^2.11.14",
4241
"dtslint": "^0.5.9",
File renamed without changes.

β€Žtsconfig.jsonβ€Ž

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": ["es6", "dom"],
5+
"noImplicitAny": true,
6+
"noImplicitThis": true,
7+
"strictNullChecks": true,
8+
"strictFunctionTypes": true,
9+
"baseUrl": ".",
10+
"noEmit": true,
11+
"forceConsistentCasingInFileNames": true,
12+
"paths": { "html-dom-parser": ["."], "html-dom-parser/lib/*": ["./lib/*"] }
13+
},
14+
"files": [
15+
"index.d.ts",
16+
"lib/domparser.d.ts",
17+
"lib/html-to-dom-client.d.ts",
18+
"lib/html-to-dom-server.d.ts",
19+
"lib/utilities.d.ts",
20+
"test/types/index.test.ts"
21+
]
22+
}

β€Žtslint.jsonβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "dtslint/dtslint.json"
3+
}

0 commit comments

Comments
Β (0)