Skip to content

refactor: move to Angular CLI based repository #2024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angularfire": {
"root": "projects/angular/fire",
"sourceRoot": "projects/angular/fire/src",
"projectType": "library",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/angular/fire/tsconfig.lib.json",
"project": "projects/angular/fire/ng-package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/angular/fire/src/test.ts",
"tsConfig": "projects/angular/fire/tsconfig.spec.json",
"karmaConfig": "projects/angular/fire/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/angular/fire/tsconfig.lib.json",
"projects/angular/fire/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angularfire"
}
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@
},
"optionalDependencies": {
"bufferutil": "~3.0.0",
"utf-8-validate": "~4.0.0"
"utf-8-validate": "^5.0.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
"@angular-devkit/build-ng-packagr": "~0.13.0",
"@angular/animations": ">=6.0.0 <8",
"@angular/cli": "^7.3.5",
"@angular/compiler-cli": ">=6.0.0 <8",
"@angular/platform-server": ">=6.0.0 <8",
"@angular/animations": ">=6.0.0 <8",
"@types/jasmine": "^2.5.36",
"@types/request": "0.0.30",
"concurrently": "^2.2.0",
Expand All @@ -71,18 +74,22 @@
"karma-mocha-reporter": "^2.0.2",
"karma-systemjs": "^0.10.0",
"ncp": "^2.0.0",
"ng-packagr": "^4.2.0",
"parse5": "^1.3.2",
"pretty-size": "^2.0.0",
"protractor": "3.0.0",
"protractor": "^5.4.2",
"reflect-metadata": "0.1.2",
"rimraf": "^2.5.4",
"rollup": "^0.64.1",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-watch": "^4.3.1",
"rxjs-compat": "^6.0.0",
"shelljs": "^0.8.0",
"systemjs": "^0.19.16",
"systemjs-builder": "^0.15.7",
"traceur": "0.0.96",
"tsickle": ">=0.34.0",
"tslib": "^1.9.0",
"typescript": ">=2.7.2 <2.8.0, >=3.1.1 <3.2"
},
"typings": "index.d.ts"
Expand Down
24 changes: 24 additions & 0 deletions projects/angular/fire/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Fire

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.2.0.

## Code scaffolding

Run `ng generate component component-name --project fire` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project fire`.
> Note: Don't forget to add `--project fire` or else it will be added to the default project in your `angular.json` file.

## Build

Run `ng build fire` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build fire`, go to the dist folder `cd dist/fire` and run `npm publish`.

## Running unit tests

Run `ng test fire` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
3 changes: 3 additions & 0 deletions projects/angular/fire/auth/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions projects/angular/fire/database-deprecated/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface CheckUrlRef {

/**
* 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.
* @param {DataSnapshot} snapshot - The snapshot to unwrap
* @param snapshot - The snapshot to unwrap
* @return AFUnwrappedDataSnapshot
* @example
* unwrapMapFn(snapshot) => { name: 'David', $key: 'david', $exists: Function }
Expand Down
3 changes: 3 additions & 0 deletions projects/angular/fire/database/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ export {
SnapshotAction
} from './interfaces';

export { RealtimeDatabaseURL };
export { RealtimeDatabaseURL };
File renamed without changes.
3 changes: 3 additions & 0 deletions projects/angular/fire/firestore/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
3 changes: 3 additions & 0 deletions projects/angular/fire/functions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
32 changes: 32 additions & 0 deletions projects/angular/fire/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../../coverage/angular/fire'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
3 changes: 3 additions & 0 deletions projects/angular/fire/messaging/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
7 changes: 7 additions & 0 deletions projects/angular/fire/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/angular/fire",
"lib": {
"entryFile": "src/public_api.ts"
}
}
8 changes: 8 additions & 0 deletions projects/angular/fire/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@angular/fire",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const FirebaseAppProvider = {
[new Optional(), FirebaseNameOrConfigToken]
]
};

@NgModule({
providers: [ FirebaseAppProvider ],
})
Expand All @@ -67,4 +67,4 @@ export class AngularFireModule {
]
}
}
}
}
5 changes: 5 additions & 0 deletions projects/angular/fire/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference path="../../../../node_modules/zone.js/dist/zone.js.d.ts" />


export * from './angularfire2';
export * from './firebase.app.module';
File renamed without changes.
22 changes: 22 additions & 0 deletions projects/angular/fire/src/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'core-js/es7/reflect';
import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
3 changes: 3 additions & 0 deletions projects/angular/fire/storage/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ngPackage": {}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
32 changes: 32 additions & 0 deletions projects/angular/fire/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"module": "es2015",
"moduleResolution": "node",
"declaration": true,
"sourceMap": true,
"inlineSources": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
17 changes: 17 additions & 0 deletions projects/angular/fire/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
17 changes: 17 additions & 0 deletions projects/angular/fire/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"lib",
"camelCase"
],
"component-selector": [
true,
"element",
"lib",
"kebab-case"
]
}
}
1 change: 1 addition & 0 deletions projects/angular/fire/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference path="../../../node_modules/zone.js/dist/zone.js.d.ts" />
2 changes: 0 additions & 2 deletions src/core/public_api.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/types.d.ts

This file was deleted.

30 changes: 30 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
],
"paths": {
"@angular/fire": [
"dist/angular/fire"
],
"@angular/fire/*": [
"dist/angular/fire/*"
]
}
}
}
Loading