Skip to content

Commit

Permalink
feat: Typescript conversion, refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Miller authored and Adam Miller committed Jan 3, 2020
1 parent d150860 commit 6ec0f45
Show file tree
Hide file tree
Showing 7 changed files with 1,649 additions and 236 deletions.
9 changes: 9 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Express from 'express';
export interface IApiHandler {
ALL?: Express.RequestHandler;
GET?: Express.RequestHandler;
POST?: Express.RequestHandler;
PUT?: Express.RequestHandler;
DELETE?: Express.RequestHandler;
}
export default function api(express: any, apiPath?: string): Express.Express;
230 changes: 230 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

232 changes: 0 additions & 232 deletions index.js

This file was deleted.

19 changes: 15 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "rebound-api",
"version": "1.0.4",
"version": "2.0.0-beta.0",
"description": "An Express middleware for elegant API creation",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "rm -rf dist && tsc --jsx preserve -p tsconfig.json",
"pretest": "yarn run build",
"test": "mocha -G dist/test",
"watch": "watch 'yarn run test' './src' './test' --wait=1",
"start": "node dist/src/index.js"
},
"repository": {
"type": "git",
Expand All @@ -24,8 +28,15 @@
},
"homepage": "https://github.com/reboundjs/rebound-api#readme",
"dependencies": {
"bluebird": "^2.9.34",
"colour": "^0.7.1",
"chalk": "^3.0.0",
"walk": "^2.3.9"
},
"devDependencies": {
"@types/express": "^4.17.2",
"@types/walk": "^2.3.0",
"express": "^4.17.1",
"mocha": "^6.2.2",
"typescript": "^3.7.4",
"watch": "^1.0.2"
}
}
Loading

0 comments on commit 6ec0f45

Please sign in to comment.