Skip to content

Commit

Permalink
fix(nx-cloudflare-wrangler): custom dist path should be relative to p…
Browse files Browse the repository at this point in the history
…roject root

BREAKING CHANGE: options.dist in "serve-page" and "deploy-page" executors are now relative to workspace root
  • Loading branch information
dmitry-stepanenko committed Jan 26, 2023
1 parent 7ca64b5 commit 65ca05f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ import { ExecutorContext, joinPathFragments } from '@nrwl/devkit';
import { PagesDeployExecutorSchema } from './schema';
import { runWranglerCommandForProject } from '../../wrangler';
import { execSync } from 'child_process';
import { resolve } from 'path';

export default async function deployExecutor(
options: PagesDeployExecutorSchema,
context: ExecutorContext
) {
if (options.dist) {
options.dist = resolve(process.cwd(), options.dist);
}
const dist = joinPathFragments(
process.cwd(),
context.workspace.projects[context.projectName].targets.build.options
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { ExecutorContext, joinPathFragments } from '@nrwl/devkit';
import { PagesServeExecutorSchema } from './schema';
import { runWranglerCommandForProject } from '../../wrangler';
import { resolve } from 'path';

export default async function deployExecutor(
options: PagesServeExecutorSchema,
context: ExecutorContext
) {
if (options.dist) {
options.dist = resolve(process.cwd(), options.dist);
}
const dist = joinPathFragments(
process.cwd(),
context.workspace.projects[context.projectName].targets.build.options
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export interface PagesServeExecutorSchema {}
export interface PagesServeExecutorSchema {
dist?: string;
}

0 comments on commit 65ca05f

Please sign in to comment.