Skip to content

Commit 7bf63e7

Browse files
committedJan 31, 2020
Updated packages. Added typescript support.
1 parent b593391 commit 7bf63e7

13 files changed

+42
-159
lines changed
 

‎.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@
33
.idea
44
coverage/
55
package-lock.json
6-
sample-project
6+
sample-project
7+
ts-sample-project
8+

‎.npmignore

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1+
/dist/
2+
/node_modules/
3+
.idea
14
coverage/
2-
node_modules/
3-
sample-project/
5+
package-lock.json
6+
sample-project
7+
ts-sample-project
8+
.travis.yml
9+
jest.config.js
10+
tsconfig.json
11+
tslint.json
12+
src/
413
tests/
5-
src/

‎jest.config.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
testURL: "http://localhost/",
1313
collectCoverage: true,
1414
collectCoverageFrom: [
15-
"src/**/*.{ts,tsx,js,jsx}"
15+
"src/**/*.ts",
16+
"!src/**/**/*.d.ts",
1617
]
17-
}
18+
}

‎package.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,31 @@
33
"license": "MIT",
44
"author": "Justin Kames",
55
"description": "vuejs-logger, provides customizable logging functionality for Vue.js.",
6-
"version": "1.5.3",
6+
"version": "1.5.4",
77
"repository": {
88
"type": "git",
99
"url": "https://github.com/justinkames/vuejs-logger.git"
1010
},
1111
"main": "dist/index.js",
1212
"scripts": {
13-
"build": "tsc",
13+
"build": "tsc && npm test && mkdir -p ./dist/lib/types && cp src/lib/types/index.d.ts ./dist/lib/types/index.d.ts",
1414
"tsc": "tsc --watch",
1515
"test": "tsc && jest",
1616
"upload-coverage": "codecov -t $CODECOV_TOKEN",
17-
"publish": "npm run build && npm publish"
17+
"publish": "npm run build && npm test && npm publish"
1818
},
1919
"devDependencies": {
20-
"@types/jest": "23.3.1",
21-
"@types/node": "10.5.3",
22-
"jest": "23.4.1",
23-
"ts-jest": "23.0.1",
24-
"typescript": "2.9.2",
25-
"chai": "4.1.2",
26-
"vue": "2.5.16",
27-
"codecov": "3.0.4"
20+
"@types/jest": "25.1.1",
21+
"@types/node": "13.5.3",
22+
"jest": "25.1.0",
23+
"ts-jest": "25.1.0",
24+
"typescript": "3.7.5",
25+
"chai": "4.2.0",
26+
"codecov": "3.6.2"
2827
},
2928
"dependencies": {
29+
"vue": "2.6.11",
3030
"es6-object-assign": "1.1.0"
31-
}
31+
},
32+
"typings": "dist/lib/types/index.d.ts"
3233
}

‎src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import ObjectAssign from "es6-object-assign";
22
ObjectAssign.polyfill();
3-
import VueLogger from "./vue-logger/vue-logger";
3+
import VueLogger from "./vue-logger";
44
export default VueLogger;

‎src/vue-logger/enum/log-levels.ts

-7
This file was deleted.

‎src/vue-logger/interfaces/logger-options.ts

-11
This file was deleted.

‎src/vue-logger/interfaces/logger.ts

-7
This file was deleted.

‎src/vue-logger/vue-logger.ts

-107
This file was deleted.

‎tests/config.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {strict, strictEqual} from "assert";
2-
import VueLogger from "../src";
3-
import {LogLevels} from "../src/vue-logger/enum/log-levels";
2+
import VueLogger from "../src/index";
3+
import {LogLevels} from "../src/enum/log-levels";
44

55
describe("isValidOptions()", () => {
66

‎tests/install.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import {notStrictEqual, strictEqual} from "assert";
22
import chai from "chai";
33
import Vue from "vue/dist/vue.min";
4-
import VueLogger from "../src";
5-
import {LogLevels} from "../src/vue-logger/enum/log-levels";
6-
import {ILoggerOptions} from "../src/vue-logger/interfaces/logger-options";
4+
import VueLogger from "../src/index";
5+
import {LogLevels} from "../src/enum/log-levels";
6+
import {ILoggerOptions} from "../src/interfaces/logger-options";
77
const expect = chai.expect;
88

99
describe("vue-logger.ts", () => {

‎tests/output.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import chai from "chai";
22
import Vue from "vue/dist/vue.min";
3-
import VueLogger from "../src";
4-
import {LogLevels} from "../src/vue-logger/enum/log-levels";
5-
import {ILoggerOptions} from "../src/vue-logger/interfaces/logger-options";
3+
import VueLogger from "../src/index";
4+
import {LogLevels} from "../src/enum/log-levels";
5+
import {ILoggerOptions} from "../src/interfaces/logger-options";
66

77
const expect = chai.expect;
88

‎tslint.json

+3
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,8 @@
1111
"allow-named-functions"
1212
]
1313
},
14+
"rules": {
15+
"quotemark": [true, "single", "avoid-escape"]
16+
},
1417
"rulesDirectory": []
1518
}

0 commit comments

Comments
 (0)
Failed to load comments.