Skip to content

Commit c67cf93

Browse files
update package
1 parent 2163668 commit c67cf93

File tree

7 files changed

+4831
-299
lines changed

7 files changed

+4831
-299
lines changed

package.json

+41-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,53 @@
22
"name": "typescript-mean-models",
33
"version": "0.0.4",
44
"description": "The models of the Typescript MEAN Stack Boilerplate",
5-
"main": "index.js",
5+
"main": "dist/index.js",
6+
"typings": "src/index.d.ts",
7+
"files": [
8+
"dist/",
9+
"LICENSE"
10+
],
611
"scripts": {
7-
"build": "tsc",
8-
"test": "echo \"Error: no test specified\" && exit 1"
12+
"lint": "tslint \"src/**/*.ts\"",
13+
"clean": "rimraf dist",
14+
"tsc": "tsc",
15+
"build": "yarn run clean && yarn run tsc",
16+
"test-spec": "mocha dist/**/*.spec.js -R spec --bail",
17+
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- \"dist/**/*.spec.js\" -R spec --bail",
18+
"test": "yarn run build && yarn run lint && yarn run test-cov",
19+
"prepublish": "typings install && yarn run build"
20+
},
21+
"engines": {
22+
"node": ">=4.2.0"
23+
},
24+
"repository": {
25+
"type": "git",
26+
"url": "https://github.com/CodebitsDesign/typescript-mean-models.git"
927
},
1028
"author": "Seokjin Seo <[email protected]>",
1129
"license": "MIT",
30+
"homepage": "https://github.com/CodebitsDesign/typescript-mean-models",
31+
"bugs": {
32+
"url": "https://github.com/CodebitsDesign/typescript-mean-models/issues"
33+
},
1234
"dependencies": {
1335
"bcrypt": "^1.0.2",
1436
"inversify": "^3.3.0",
15-
"reflect-metadata": "^0.1.10"
37+
"reflect-metadata": "^0.1.10",
38+
"tsconfig": "^6.0.0"
39+
},
40+
"devDependencies": {
41+
"@angular/cli": "^1.0.1",
42+
"chai": "^3.5.0",
43+
"chai-http": "^3.0.0",
44+
"istanbul": "^0.4.0",
45+
"mocha": "^3.3.0",
46+
"rimraf": "^2.5.4",
47+
"semver": "^5.1.0",
48+
"ts-node": "^3.0.2",
49+
"tslint": "^5.0.0",
50+
"tslint-config-standard": "^5.0.1",
51+
"typescript": "^2.3.0",
52+
"typings": "^2.0.0"
1653
}
1754
}

src/api.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import {User} from "./user.model";
2-
import {Item} from "./item.model";
1+
import {User} from './user.model'
2+
import {Item} from './item.model'
33

4-
export interface api {
4+
export interface Api {
55
v1: {
66
user: StandardRestInterface<User, {}>,
77
item: StandardRestInterface<Item, {}>
88
}
99
}
1010

11-
interface StandardRestInterface<T, K> {
11+
export interface StandardRestInterface<T, K> {
1212
get: {
1313
id: string;
1414
queryParams?: K;
@@ -22,4 +22,4 @@ interface StandardRestInterface<T, K> {
2222
delete: {
2323
id: string
2424
}
25-
}
25+
}

src/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from './app-properties.model';
2-
export * from './key.model';
3-
export * from './user.model';
1+
export * from './app-properties.model'
2+
export * from './key.model'
3+
export * from './user.model'

src/user.model.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export interface User {
2-
id: string;
3-
email: string;
2+
id: string
3+
email: string
44
password: {
55
hash: string;
66
algo: HashingAlgo;
77
}
88
}
99

10-
type HashingAlgo = 'bcrypt'
10+
export type HashingAlgo = 'bcrypt'

tsconfig.json

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
{
22
"compilerOptions": {
33
"outDir": "dist",
4-
"baseUrl": "src",
5-
"sourceMap": true,
6-
"declaration": false,
74
"experimentalDecorators": true,
85
"emitDecoratorMetadata": true,
96
"target": "es6",
107
"lib": ["es6"],
118
"types": ["reflect-metadata"],
12-
"module": "es6"
9+
"module": "commonjs",
10+
"declaration": true,
11+
"noImplicitAny": true,
12+
"strictNullChecks": true,
13+
"removeComments": true,
14+
"noUnusedLocals": true,
15+
"noUnusedParameters": true,
16+
"moduleResolution": "node",
17+
"sourceMap": true,
18+
"inlineSources": true
1319
},
20+
"include": [
21+
"src/**/*",
22+
"typings/**/*"
23+
],
1424
"exclude": [
1525
"node_modules",
16-
"**/*.spec.ts",
17-
"**/*.test.ts"
26+
"typings",
27+
"typings/index.d.ts"
1828
]
1929
}

tslint.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "tslint-config-standard"
3+
}

0 commit comments

Comments
 (0)