Skip to content

Commit

Permalink
new typings system
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeautry committed Aug 9, 2016
1 parent 57e943a commit 49730cf
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 37 deletions.
22 changes: 17 additions & 5 deletions package.json
Expand Up @@ -8,13 +8,12 @@
"build": "npm run clean && npm run lint && tsc",
"clean": "rimraf dist && rimraf test/fixtures/routes.ts",
"lint": "tslint ./src/**/*.ts",
"prepublish": "npm run typings install && npm run build",
"prepublish": "npm run build",
"deploy": "npm version patch && git push origin master && npm publish",
"routes-gen": "ts-node ./src/cli.ts routes --entry-file=./tests/fixtures/server.ts --routes-dir=./tests/fixtures",
"swagger-gen": "ts-node ./src/cli.ts swagger --entry-file=./tests/fixtures/server.ts --swagger-dir=./dist --host=localhost:3000",
"test": "npm run swagger-gen && npm run routes-gen && mocha **/*.spec.ts --compilers ts:ts-node/register",
"tsc": "tsc",
"typings": "typings"
"tsc": "tsc"
},
"author": "Luke Autry <lukeautry@gmail.com> (http://www.lukeautry.com)",
"license": "MIT",
Expand All @@ -29,15 +28,28 @@
"yargs": "^4.8.0"
},
"devDependencies": {
"@types/body-parser": "0.0.30",
"@types/chai": "^3.4.30",
"@types/express": "^4.0.30",
"@types/handlebars": "^3.0.28",
"@types/method-override": "0.0.27",
"@types/mime": "0.0.28",
"@types/minimatch": "^2.0.28",
"@types/mkdirp": "^0.3.28",
"@types/mocha": "^2.2.29",
"@types/node": "^6.0.32",
"@types/serve-static": "^1.7.28",
"@types/superagent": "^2.0.29",
"@types/supertest": "^1.1.28",
"@types/yargs": "0.0.28",
"body-parser": "^1.15.2",
"chai": "^3.5.0",
"method-override": "^2.3.6",
"mocha": "^2.5.3",
"rimraf": "^2.5.3",
"supertest": "^1.2.0",
"ts-node": "^0.9.3",
"tslint": "^3.13.0",
"typings": "^1.3.1"
"tslint": "^3.13.0"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions tests/ambient.d.ts
@@ -0,0 +1 @@
/// <reference path="../node_modules/@types/mocha/index.d.ts" />
1 change: 0 additions & 1 deletion tests/fixtures/server.ts
@@ -1,4 +1,3 @@
/// <reference path="../../typings/index.d.ts" />
import * as methodOverride from 'method-override';
import * as express from 'express';
import * as bodyParser from 'body-parser';
Expand Down
3 changes: 1 addition & 2 deletions tests/integration/server.spec.ts
@@ -1,4 +1,3 @@
/// <reference path="../../typings/index.d.ts" />
import {app} from '../fixtures/server';
import {TestModel} from '../fixtures/testModel';
import * as chai from 'chai';
Expand Down Expand Up @@ -134,7 +133,7 @@ describe('Server', () => {

function verifyRequest(
verifyResponse: (err: any, res: request.Response) => any,
methodOperation: (request: request.SuperTest) => request.Test,
methodOperation: (request: request.SuperTest<any>) => request.Test,
expectedStatus?: number
) {
expectedStatus = expectedStatus || 200;
Expand Down
@@ -1,4 +1,3 @@
/// <reference path="../../../../typings/index.d.ts" />
import {MetadataGenerator} from '../../../../src/metadataGeneration/metadataGenerator';
import {SpecGenerator} from '../../../../src/swagger/specGenerator';
import {getDefaultOptions} from '../../../fixtures/defaultOptions';
Expand Down
1 change: 0 additions & 1 deletion tests/unit/swagger/schemaDetails.spec.ts
@@ -1,4 +1,3 @@
/// <reference path="../../../typings/index.d.ts" />
import {MetadataGenerator} from '../../../src/metadataGeneration/metadataGenerator';
import {SpecGenerator} from '../../../src/swagger/specGenerator';
import {getDefaultOptions} from '../../fixtures/defaultOptions';
Expand Down
1 change: 0 additions & 1 deletion tests/unit/utilities/verifyParameter.ts
@@ -1,4 +1,3 @@
/// <reference path="../../../typings/index.d.ts" />
import {Swagger} from '../../../src/swagger/swagger';
import * as chai from 'chai';

Expand Down
2 changes: 0 additions & 2 deletions tests/unit/utilities/verifyPath.ts
@@ -1,5 +1,3 @@
/// <reference path="../../../typings/index.d.ts" />

import {Swagger} from '../../../src/swagger/swagger';
import * as chai from 'chai';

Expand Down
7 changes: 1 addition & 6 deletions tsconfig.json
Expand Up @@ -7,10 +7,5 @@
"target": "es6",
"experimentalDecorators": true,
"declaration": true
},
"files": [
"./src/index.ts",
"./src/cli.ts",
"./typings/index.d.ts"
]
}
}
18 changes: 0 additions & 18 deletions typings.json

This file was deleted.

0 comments on commit 49730cf

Please sign in to comment.