Merge pull request #233 from arimus/next
Provide main entrypoint and generated typings to use the core as a li…
This commit is contained in:
commit
18b1bd6824
@ -2,4 +2,5 @@
|
||||
test/integration/defaultValues/**/*.ts
|
||||
test/integration/entityTypes/**/*.ts
|
||||
test/integration/examples/**/*.ts
|
||||
test/integration/github-issues/**/*.ts
|
||||
test/integration/github-issues/**/*.ts
|
||||
dist/**/*.d.ts
|
||||
|
@ -3,13 +3,15 @@
|
||||
"version": "0.3.5",
|
||||
"description": "Generates models for TypeORM from existing databases.",
|
||||
"bin": "bin/typeorm-model-generator",
|
||||
"main": "./dist/src/library.js",
|
||||
"types": "./dist/src/library.d.ts",
|
||||
"scripts": {
|
||||
"start": "ts-node ./src/index.ts",
|
||||
"build": "npm run clean && tsc && ncp src/templates/ dist/src/templates/ && ncp package.json dist/package.json",
|
||||
"prepare": "npm run build",
|
||||
"pretest": "tsc --noEmit",
|
||||
"test": "nyc --reporter=lcov ts-node ./node_modules/mocha/bin/_mocha test/**/*.test.ts -- --bail",
|
||||
"posttest": "eslint ./**/*.ts ./src/**/*.ts ./test/**/*.ts",
|
||||
"posttest": "eslint ./src/**/*.ts ./test/**/*.ts",
|
||||
"clean": "rimraf coverage output dist",
|
||||
"prettier": "prettier --write ./src/*.ts ./src/**/*.ts"
|
||||
},
|
||||
|
18
src/library.ts
Normal file
18
src/library.ts
Normal file
@ -0,0 +1,18 @@
|
||||
import * as Engine from "./Engine";
|
||||
import * as IConnectionOptions from "./IConnectionOptions";
|
||||
import * as IGenerationOptions from "./IGenerationOptions";
|
||||
import * as NamingStrategy from "./NamingStrategy";
|
||||
import * as Utils from "./Utils";
|
||||
|
||||
export { Column } from "./models/Column";
|
||||
export { Entity } from "./models/Entity";
|
||||
export { Index } from "./models/Index";
|
||||
export { Relation } from "./models/Relation";
|
||||
export { RelationId } from "./models/RelationId";
|
||||
export {
|
||||
Engine,
|
||||
IConnectionOptions,
|
||||
IGenerationOptions,
|
||||
NamingStrategy,
|
||||
Utils
|
||||
};
|
@ -6,7 +6,7 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"declaration": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noImplicitReturns": true,
|
||||
"stripInternal": true,
|
||||
|
Loading…
Reference in New Issue
Block a user