Skip to content

Commit 4681742

Browse files
authored
Merge pull request #161 from rob3000/typescript
Added base tsconfig.json. Moved files under src.
2 parents 69d4f1e + 95dd10e commit 4681742

28 files changed

+623
-10
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage/*
2+
/node_modules/*
3+
examples/*

.eslintrc.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
"env": {
3+
"es6": true,
4+
"node": true,
5+
"mocha": true
6+
},
7+
"parser": '@typescript-eslint/parser',
8+
"plugins": [
9+
'@typescript-eslint',
10+
],
11+
"extends": [
12+
'eslint:recommended',
13+
'plugin:@typescript-eslint/recommended',
14+
],
15+
"rules": {
16+
"indent": [
17+
"error",
18+
2
19+
],
20+
"linebreak-style": [
21+
"error",
22+
"unix"
23+
],
24+
"quotes": [
25+
"error",
26+
"double"
27+
],
28+
"semi": [
29+
"error",
30+
"always"
31+
],
32+
"no-console": 0
33+
}
34+
};

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ logs/
4141
certs/
4242
.vscode/*.sql
4343
.vscode/settings.json
44+
45+
dist

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ examples
77
kafka-setup
88
.editorconfig
99
.travis.yml
10-
.gitignore
10+
.gitignore
11+
src

package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "kafka-streams",
33
"version": "5.0.0",
44
"description": "kafka-streams for Node.js",
5-
"typings": "index.d.ts",
6-
"main": "index.js",
5+
"types": "dist/types.d.ts",
6+
"main": "dist/index.js",
77
"scripts": {
88
"consumeFromTopic": "node ./examples/consumeFromTopic.js",
99
"consumeOneProduceTwo": "node ./examples/consumeOneProduceTwo.js",
@@ -28,8 +28,9 @@
2828
"kafka:start": "./kafka-setup/start.sh",
2929
"kafka:stop": "./kafka-setup/stop.sh",
3030
"kafka:logs": "docker-compose --file ./kafka-setup/docker-compose.yml logs -f",
31-
"ts": "tsc ./index.d.ts",
32-
"yarn:openssl": "LDFLAGS='-L/usr/local/opt/openssl/lib' CPPFLAGS='-I/usr/local/opt/openssl/include' yarn"
31+
"yarn:openssl": "LDFLAGS='-L/usr/local/opt/openssl/lib' CPPFLAGS='-I/usr/local/opt/openssl/include' yarn",
32+
"prepublishOnly": "tsc -p tsconfig.json",
33+
"lint": "eslint src/. --ext .ts .js"
3334
},
3435
"repository": {
3536
"type": "git",
@@ -71,11 +72,16 @@
7172
"uuid": "~3.4.0"
7273
},
7374
"devDependencies": {
75+
"@types/node": "^14.0.27",
76+
"@typescript-eslint/eslint-plugin": "^3.9.0",
77+
"@typescript-eslint/parser": "^3.9.0",
7478
"async": "~3.2.0",
79+
"eslint": "^7.7.0",
7580
"jsdoc": "~3.6.3",
7681
"jsdoc-to-markdown": "~5.0.3",
7782
"log4bro": "~3.14.0",
7883
"mocha": "~7.0.1",
79-
"proxyquire": "~2.1.3"
84+
"proxyquire": "~2.1.3",
85+
"typescript": "^3.9.7"
8086
}
8187
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)