File tree 3 files changed +32
-3
lines changed
3 files changed +32
-3
lines changed Original file line number Diff line number Diff line change 9
9
"version" : " 1.1.0" ,
10
10
"main" : " ./lib/index.js" ,
11
11
"files" : [
12
- " lib/**/*.js "
12
+ " lib/"
13
13
],
14
14
"scripts" : {
15
15
"build" : " node_modules/.bin/tsc" ,
Original file line number Diff line number Diff line change 1
1
import { Racer } from './Racer' ;
2
- module . exports = new Racer ( ) ;
2
+ import { Model } from './Model' ;
3
+ import * as util from './util' ;
4
+ import { RacerBackend } from './Backend' ;
5
+ import { Query } from './Model/Query' ;
6
+
7
+ // module.exports = new Racer();
8
+ const { use, serverUse } = util ;
9
+
10
+ export { Model } ;
11
+ export { Query } ;
12
+ export { Racer } ;
13
+ export { RacerBackend } ;
14
+ export { use , serverUse } ;
15
+ export { util } ;
16
+ export const racer = new Racer ( ) ;
17
+
18
+ export function createModel ( data ) {
19
+ var model = new Model ( ) ;
20
+ if ( data ) {
21
+ model . createConnection ( data ) ;
22
+ model . unbundle ( data ) ;
23
+ }
24
+ return model ;
25
+ }
26
+
27
+ export function createBackend ( options ) {
28
+ return new RacerBackend ( racer , options ) ;
29
+ } ;
Original file line number Diff line number Diff line change 6
6
"module" : " CommonJS" ,
7
7
"noImplicitUseStrict" : true ,
8
8
"outDir" : " lib" ,
9
+ "target" : " ES5" ,
9
10
"sourceMap" : false ,
10
- "target" : " ES5"
11
+ "declaration" : true ,
12
+ "declarationMap" : false ,
11
13
},
12
14
"include" : [
13
15
" src/**/*"
You can’t perform that action at this time.
0 commit comments