Skip to content

Commit 50a3d7b

Browse files
committed
fix(npm): Added an index file so that TinyType can be easily imported
1 parent 04711fc commit 50a3d7b

File tree

7 files changed

+32
-31
lines changed

7 files changed

+32
-31
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
node_modules
77

88
.nyc_output
9+
reports
910
lib

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ package-lock.json
99

1010
# Specs
1111
spec
12+
reports
1213
mocha.opts
1314
tsconfig*.json
1415
tslint.json

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ node_js:
88
- '9'
99
- '8'
1010
- '6'
11+
script: npm run verify
1112
after_success:
1213
- npm run travis-deploy-once "npm run semantic-release"
1314
branches:

package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,32 @@
5858
"config": {
5959
"commitizen": {
6060
"path": "./node_modules/cz-conventional-changelog"
61-
},
62-
"nyc": {
63-
"include": [
64-
"src/*.ts",
65-
"src/**/*.ts"
66-
],
67-
"exclude": [
68-
"features",
69-
"lib",
70-
"node_modules",
71-
"spec",
72-
"staging"
73-
],
74-
"extension": [
75-
".ts"
76-
],
77-
"require": [
78-
"ts-node/register"
79-
],
80-
"reporter": [
81-
"json",
82-
"text-summary",
83-
"html"
84-
],
85-
"cache": true,
86-
"all": true
8761
}
62+
},
63+
"nyc": {
64+
"include": [
65+
"src/*.ts",
66+
"src/**/*.ts"
67+
],
68+
"exclude": [
69+
"features",
70+
"lib",
71+
"node_modules",
72+
"spec",
73+
"staging"
74+
],
75+
"extension": [
76+
".ts"
77+
],
78+
"require": [
79+
"ts-node/register"
80+
],
81+
"reporter": [
82+
"json",
83+
"text-summary",
84+
"html"
85+
],
86+
"cache": true,
87+
"all": true
8888
}
8989
}

spec/TinyType.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'mocha';
2-
import { TinyType } from '../src/TinyType';
2+
import { TinyType } from '../src';
33
import expect = require('./expect');
44
import { given } from 'mocha-testdata';
55

src/TinyType.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export abstract class TinyType {
1919

2020
toString() {
2121
const fields = this.fields().reduce((acc: string[], field: string) => {
22-
return acc.concat(`${field}=${this[field]}`)
22+
return acc.concat(`${field}=${this[field]}`);
2323
}, []);
2424

2525
return `${this.constructor.name}(${fields.join(', ')})`;

src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
export function hi() {
2-
return 2;
3-
}
1+
export * from './TinyType';

0 commit comments

Comments
 (0)