Skip to content

Commit 6e66a15

Browse files
committed
refactor: move to Angular CLI based repository
1 parent ce12956 commit 6e66a15

File tree

103 files changed

+4641
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4641
-415
lines changed

angular.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"angularfire": {
7+
"root": "projects/angular/fire",
8+
"sourceRoot": "projects/angular/fire/src",
9+
"projectType": "library",
10+
"prefix": "lib",
11+
"architect": {
12+
"build": {
13+
"builder": "@angular-devkit/build-ng-packagr:build",
14+
"options": {
15+
"tsConfig": "projects/angular/fire/tsconfig.lib.json",
16+
"project": "projects/angular/fire/ng-package.json"
17+
}
18+
},
19+
"test": {
20+
"builder": "@angular-devkit/build-angular:karma",
21+
"options": {
22+
"main": "projects/angular/fire/src/test.ts",
23+
"tsConfig": "projects/angular/fire/tsconfig.spec.json",
24+
"karmaConfig": "projects/angular/fire/karma.conf.js"
25+
}
26+
},
27+
"lint": {
28+
"builder": "@angular-devkit/build-angular:tslint",
29+
"options": {
30+
"tsConfig": [
31+
"projects/angular/fire/tsconfig.lib.json",
32+
"projects/angular/fire/tsconfig.spec.json"
33+
],
34+
"exclude": [
35+
"**/node_modules/**"
36+
]
37+
}
38+
}
39+
}
40+
}
41+
},
42+
"defaultProject": "angularfire"
43+
}

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@
4343
},
4444
"optionalDependencies": {
4545
"bufferutil": "~3.0.0",
46-
"utf-8-validate": "~4.0.0"
46+
"utf-8-validate": "^5.0.2"
4747
},
4848
"devDependencies": {
49+
"@angular-devkit/build-angular": "~0.13.0",
50+
"@angular-devkit/build-ng-packagr": "~0.13.0",
51+
"@angular/animations": ">=6.0.0 <8",
52+
"@angular/cli": "^7.3.5",
4953
"@angular/compiler-cli": ">=6.0.0 <8",
5054
"@angular/platform-server": ">=6.0.0 <8",
51-
"@angular/animations": ">=6.0.0 <8",
5255
"@types/jasmine": "^2.5.36",
5356
"@types/request": "0.0.30",
5457
"concurrently": "^2.2.0",
@@ -71,18 +74,22 @@
7174
"karma-mocha-reporter": "^2.0.2",
7275
"karma-systemjs": "^0.10.0",
7376
"ncp": "^2.0.0",
77+
"ng-packagr": "^4.2.0",
7478
"parse5": "^1.3.2",
7579
"pretty-size": "^2.0.0",
76-
"protractor": "3.0.0",
80+
"protractor": "^5.4.2",
7781
"reflect-metadata": "0.1.2",
7882
"rimraf": "^2.5.4",
7983
"rollup": "^0.64.1",
8084
"rollup-plugin-node-resolve": "^3.3.0",
8185
"rollup-watch": "^4.3.1",
86+
"rxjs-compat": "^6.0.0",
8287
"shelljs": "^0.8.0",
8388
"systemjs": "^0.19.16",
8489
"systemjs-builder": "^0.15.7",
8590
"traceur": "0.0.96",
91+
"tsickle": ">=0.34.0",
92+
"tslib": "^1.9.0",
8693
"typescript": ">=2.7.2 <2.8.0, >=3.1.1 <3.2"
8794
},
8895
"typings": "index.d.ts"

projects/angular/fire/README.md

Lines changed: 24 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}

src/database-deprecated/utils.ts renamed to projects/angular/fire/database-deprecated/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface CheckUrlRef {
4545

4646
/**
4747
* Unwraps the data returned in the DataSnapshot. Exposes the DataSnapshot key and exists methods through the $key and $exists properties respectively. If the value is primitive, it is unwrapped using a $value property. The $ properies mean they cannot be saved in the Database as those characters are invalid.
48-
* @param {DataSnapshot} snapshot - The snapshot to unwrap
48+
* @param snapshot - The snapshot to unwrap
4949
* @return AFUnwrappedDataSnapshot
5050
* @example
5151
* unwrapMapFn(snapshot) => { name: 'David', $key: 'david', $exists: Function }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}

src/database/database.ts renamed to projects/angular/fire/database/src/database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ export {
5858
SnapshotAction
5959
} from './interfaces';
6060

61-
export { RealtimeDatabaseURL };
61+
export { RealtimeDatabaseURL };
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}

projects/angular/fire/karma.conf.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, '../../../coverage/angular/fire'),
20+
reports: ['html', 'lcovonly'],
21+
fixWebpackSourcePaths: true
22+
},
23+
reporters: ['progress', 'kjhtml'],
24+
port: 9876,
25+
colors: true,
26+
logLevel: config.LOG_INFO,
27+
autoWatch: true,
28+
browsers: ['Chrome'],
29+
singleRun: false,
30+
restartOnFileChange: true
31+
});
32+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}

projects/angular/fire/ng-package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../../dist/angular/fire",
4+
"lib": {
5+
"entryFile": "src/public_api.ts"
6+
}
7+
}

projects/angular/fire/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "@angular/fire",
3+
"version": "0.0.1",
4+
"peerDependencies": {
5+
"@angular/common": "^7.2.0",
6+
"@angular/core": "^7.2.0"
7+
}
8+
}
File renamed without changes.

src/core/firebase.app.module.ts renamed to projects/angular/fire/src/firebase.app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const FirebaseAppProvider = {
5353
[new Optional(), FirebaseNameOrConfigToken]
5454
]
5555
};
56-
56+
5757
@NgModule({
5858
providers: [ FirebaseAppProvider ],
5959
})
@@ -67,4 +67,4 @@ export class AngularFireModule {
6767
]
6868
}
6969
}
70-
}
70+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path="../../../../node_modules/zone.js/dist/zone.js.d.ts" />
2+
3+
4+
export * from './angularfire2';
5+
export * from './firebase.app.module';

projects/angular/fire/src/test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
2+
3+
import 'core-js/es7/reflect';
4+
import 'zone.js/dist/zone';
5+
import 'zone.js/dist/zone-testing';
6+
import { getTestBed } from '@angular/core/testing';
7+
import {
8+
BrowserDynamicTestingModule,
9+
platformBrowserDynamicTesting
10+
} from '@angular/platform-browser-dynamic/testing';
11+
12+
declare const require: any;
13+
14+
// First, initialize the Angular testing environment.
15+
getTestBed().initTestEnvironment(
16+
BrowserDynamicTestingModule,
17+
platformBrowserDynamicTesting()
18+
);
19+
// Then we find all the tests.
20+
const context = require.context('./', true, /\.spec\.ts$/);
21+
// And load the modules.
22+
context.keys().map(context);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ngPackage": {}
3+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"extends": "../../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../../out-tsc/lib",
5+
"target": "es2015",
6+
"module": "es2015",
7+
"moduleResolution": "node",
8+
"declaration": true,
9+
"sourceMap": true,
10+
"inlineSources": true,
11+
"emitDecoratorMetadata": true,
12+
"experimentalDecorators": true,
13+
"importHelpers": true,
14+
"types": [],
15+
"lib": [
16+
"dom",
17+
"es2018"
18+
]
19+
},
20+
"angularCompilerOptions": {
21+
"annotateForClosureCompiler": true,
22+
"skipTemplateCodegen": true,
23+
"strictMetadataEmit": true,
24+
"fullTemplateTypeCheck": true,
25+
"strictInjectionParameters": true,
26+
"enableResourceInlining": true
27+
},
28+
"exclude": [
29+
"src/test.ts",
30+
"**/*.spec.ts"
31+
]
32+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "../../../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../../../out-tsc/spec",
5+
"types": [
6+
"jasmine",
7+
"node"
8+
]
9+
},
10+
"files": [
11+
"src/test.ts"
12+
],
13+
"include": [
14+
"**/*.spec.ts",
15+
"**/*.d.ts"
16+
]
17+
}

projects/angular/fire/tslint.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "../../../tslint.json",
3+
"rules": {
4+
"directive-selector": [
5+
true,
6+
"attribute",
7+
"lib",
8+
"camelCase"
9+
],
10+
"component-selector": [
11+
true,
12+
"element",
13+
"lib",
14+
"kebab-case"
15+
]
16+
}
17+
}

projects/angular/fire/types.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference path="../../../node_modules/zone.js/dist/zone.js.d.ts" />

src/core/public_api.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/types.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

tsconfig.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"baseUrl": "./",
5+
"outDir": "./dist/out-tsc",
6+
"sourceMap": true,
7+
"declaration": false,
8+
"module": "es2015",
9+
"moduleResolution": "node",
10+
"emitDecoratorMetadata": true,
11+
"experimentalDecorators": true,
12+
"importHelpers": true,
13+
"target": "es5",
14+
"typeRoots": [
15+
"node_modules/@types"
16+
],
17+
"lib": [
18+
"es2018",
19+
"dom"
20+
],
21+
"paths": {
22+
"@angular/fire": [
23+
"dist/angular/fire"
24+
],
25+
"@angular/fire/*": [
26+
"dist/angular/fire/*"
27+
]
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)