Skip to content

Commit

Permalink
Merge pull request #30 from recifejs/feature/single-file-type
Browse files Browse the repository at this point in the history
Single file type with npm-dts
  • Loading branch information
Oda2 committed Jul 29, 2020
2 parents ccccfc1 + 3b96f9b commit b126636
Show file tree
Hide file tree
Showing 8 changed files with 1,012 additions and 29 deletions.
4 changes: 1 addition & 3 deletions example/config/bodyParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ const bodyParserConfig: BodyParserConfig = {
text: '1mb'
},
strict: true,
detectJSON: undefined,
extendTypes: {
json: undefined,
form: undefined,
text: undefined
},
onerror: undefined
}
};

export default bodyParserConfig;
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"version": "0.7.4",
"description": "MVC Framework for GraphQL",
"license": "MIT",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"homepage": "https://recifejs.org/",
"repository": "https://github.com/recifejs/recife",
"scripts": {
"build": "tsc -p .",
"build": "tsc -p . && yarn types",
"test": "mocha -r ts-node/register --timeout 10000 test/**/*.test.ts",
"coverage": "nyc npm run test"
"coverage": "nyc npm run test",
"types": "npm-dts generate -o ./dist/index.d.ts -L error"
},
"files": [
"dist",
Expand All @@ -33,6 +34,7 @@
"chai": "^4.2.0",
"fast-deep-equal": "^3.1.3",
"mocha": "^8.0.1",
"npm-dts": "^1.3.1",
"nyc": "^15.1.0",
"sinon": "^9.0.2",
"ts-node": "^8.10.2",
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.ts → src/scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import Build from '../src/Build';
import Log from '../src/log';
import Build from '../Build';
import Log from '../log';

Log.Instance.title(`Build RecifeJs`);

Expand Down
2 changes: 1 addition & 1 deletion scripts/index.ts → src/scripts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ process.on('unhandledRejection', err => {
});

import { spawnSync } from 'child_process';
import Log from '../src/log';
import Log from '../log';

const args = process.argv.slice(2);
const scripts = ['start', 'build', 'server'];
Expand Down
4 changes: 2 additions & 2 deletions scripts/server.ts → src/scripts/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import Server from '../src/Server';
import Log from '../src/log';
import Server from '../Server';
import Log from '../log';

Log.Instance.title(`Start Server RecifeJs`);

Expand Down
4 changes: 2 additions & 2 deletions scripts/start.ts → src/scripts/start.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import Start from '../src/Start';
import Log from '../src/log';
import Start from '../Start';
import Log from '../log';

Log.Instance.title(`Start RecifeJs`);

Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"module": "commonjs",
"outDir": "dist",
"strict": true,
"declaration": true,
"declaration": false,
"resolveJsonModule": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true
},
"include": ["src", "bin", "scripts"],
"include": ["src"],
"exclude": ["node_modules"]
}
Loading

0 comments on commit b126636

Please sign in to comment.