Skip to content

Commit 125cc13

Browse files
committed
Cleaning some stuff up, still having spec issues
1 parent 1d5dcd2 commit 125cc13

File tree

5 files changed

+10
-16
lines changed

5 files changed

+10
-16
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
sudo: false
33
node_js:
4-
- 'node'
4+
- 'lts/*'
55

66
addons:
77
chrome: stable

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"optionalDependencies": {
5252
"bufferutil": "~3.0.0",
5353
"utf-8-validate": "~4.0.0"
54-
},
54+
},
5555
"devDependencies": {
5656
"@angular/compiler-cli": ">=6.0.0 <8",
5757
"@angular/platform-server": ">=6.0.0 <8",

src/root.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export * from './packages-dist/database/list/snapshot-changes.spec';
1313
export * from './packages-dist/database/list/state-changes.spec';
1414
export * from './packages-dist/database/list/audit-trail.spec';
1515
export * from './packages-dist/storage/storage.spec';
16-
//export * from './packages-dist/schematics/ng-add.spec';
16+
//export * from './packages-dist/schematics/index.spec';
1717
//export * from './packages-dist/messaging/messaging.spec';
1818

1919
// // Since this a deprecated API, we run on it on manual tests only

src/schematics/index.ts

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Tree } from '@angular-devkit/schematics';
2-
import { from, Observable } from 'rxjs';
2+
import { from } from 'rxjs';
3+
import { map } from 'rxjs/operators';
34
import { Project } from './interfaces';
45
import { ngAdd } from './ng-add';
56
import { listProjects, projectPrompt } from './utils';
@@ -10,14 +11,7 @@ interface DeployOptions {
1011

1112
// You don't have to export the function as default. You can also have more than one rule factory
1213
// per file.
13-
export function ngDeploy({project}: DeployOptions): (host: Tree) => Observable<Tree> {
14-
return (host: Tree): Observable<Tree> => {
15-
return from<Tree>(
16-
listProjects().then((projects: Project[]) => {
17-
return projectPrompt(projects).then(({firebaseProject}: any) => {
18-
return ngAdd(host, {firebaseProject, project})
19-
});
20-
})
21-
);
22-
};
23-
}
14+
export const ngDeploy = ({project}: DeployOptions) => (host: Tree) => from(listProjects()).pipe(
15+
map((projects: Project[]) => projectPrompt(projects)),
16+
map(({firebaseProject}: any) => ngAdd(host, {firebaseProject, project}))
17+
)

tools/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function copySchematicFiles() {
248248
return Promise.all([
249249
copy(`${process.cwd()}/src/core/builders.json`, `${process.cwd()}/dist/packages-dist/builders.json`),
250250
copy(`${process.cwd()}/src/core/collection.json`, `${process.cwd()}/dist/packages-dist/collection.json`),
251-
copy(`${process.cwd()}/src/schematics/deploy/schema.json`, `${process.cwd()}/dist/packages-dist/schematics/deploy`)
251+
copy(`${process.cwd()}/src/schematics/deploy/schema.json`, `${process.cwd()}/dist/packages-dist/schematics/deploy/schema.json`)
252252
]);
253253
}
254254

0 commit comments

Comments
 (0)