Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
3 changes: 1 addition & 2 deletions src/schematics/deploy/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ export default createBuilder<any>(
const project = workspace.getProject(context.target.project);

const firebaseProject = getFirebaseProjectName(
workspace.root,
context.target.project
);

try {
await deploy(
require("firebase-tools"),
context,
join(workspace.root, project.root),
project.root,
firebaseProject
);
} catch (e) {
Expand Down
4 changes: 1 addition & 3 deletions src/schematics/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { readFileSync } from "fs";
import { FirebaseRc, Project } from "./interfaces";
import { join } from "path";

export function listProjects() {
const firebase = require('firebase-tools');
Expand Down Expand Up @@ -57,11 +56,10 @@ export const projectPrompt = (projects: Project[]) => {
};

export function getFirebaseProjectName(
projectRoot: string,
target: string
): string | undefined {
const { targets }: FirebaseRc = JSON.parse(
readFileSync(join(projectRoot, ".firebaserc"), "UTF-8")
readFileSync(".firebaserc", "UTF-8")
);
const projects = Object.keys(targets!);
return projects.find(
Expand Down