File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 88 "test" : " npm run build; karma start" ,
99 "docs" : " typedoc --out docs/api/ --module commonjs --mode modules --name AngularFire2 src" ,
1010 "build" : " rm -rf dist; tsc" ,
11- "build_npm" : " rm -rf dist && ./node_modules/.bin/ tsc -p tsconfig.publish.es5.json && ./node_modules/.bin/ tsc -p tsconfig.publish.es6.json" ,
11+ "build_npm" : " rm -rf dist && tsc -p tsconfig.publish.es5.json && tsc -p tsconfig.publish.es6.json" ,
1212 "postbuild_npm" : " cp package.json README.md .npmignore dist/ && npm run rewrite_npm_package" ,
13+ "postinstall" : " typings install" ,
1314 "rewrite_npm_package" : " node --harmony_destructuring tools/rewrite-published-package.js" ,
1415 "build_bundle" : " cp -r src angularfire2 && tsc typings/main.d.ts angularfire2.ts --rootDir . --module system -t es5 --outFile dist/bundles/angularfire2.js --moduleResolution node --emitDecoratorMetadata --experimentalDecorators"
1516 },
Original file line number Diff line number Diff line change @@ -38,22 +38,33 @@ function getAbsUrl (root:string, url:string) {
3838}
3939
4040export const COMMON_PROVIDERS : any [ ] = [
41- provide ( FirebaseRef , {
42- useFactory : ( url :string ) => new Firebase ( url ) ,
43- deps : [ FirebaseUrl ] } ) ,
41+ {
42+ provide : FirebaseRef ,
43+ useFactory : _getFirebase ,
44+ deps : [ FirebaseUrl ]
45+ } ,
4446 FirebaseAuth ,
4547 AngularFire ,
4648 FirebaseDatabase
4749] ;
4850
51+ function _getFirebase ( url :string ) : Firebase {
52+ return new Firebase ( url ) ;
53+ }
54+
4955export const FIREBASE_PROVIDERS :any [ ] = [
5056 COMMON_PROVIDERS ,
51- provide ( AuthBackend , {
52- useFactory : ( ref : Firebase ) => new FirebaseSdkAuthBackend ( ref , false ) ,
57+ {
58+ provide : AuthBackend ,
59+ useFactory : _getAuthBackend ,
5360 deps : [ FirebaseRef ]
54- } )
61+ }
5562] ;
5663
64+ function _getAuthBackend ( ref : Firebase ) : FirebaseSdkAuthBackend {
65+ return new FirebaseSdkAuthBackend ( ref , false ) ;
66+ }
67+
5768/**
5869 * Used to define the default Firebase root location to be
5970 * used throughout an application.
You can’t perform that action at this time.
0 commit comments