cleanup(angular): remove deep import to nrwl/workspace for getNewProjectName (#15494)

This commit is contained in:
Colum Ferry 2023-03-07 12:19:25 +00:00 committed by GitHub
parent e394220e10
commit 14f0f38ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import {
Tree,
visitNotIgnoredFiles,
} from '@nrwl/devkit';
import { getNewProjectName } from '@nrwl/workspace/src/generators/move/lib/utils';
import { getNewProjectName } from '../../utils/get-new-project-name';
import { join } from 'path';
import { Schema } from '../schema';

View File

@ -6,7 +6,7 @@ import {
updateJson,
workspaceRoot,
} from '@nrwl/devkit';
import { getNewProjectName } from '@nrwl/workspace/src/generators/move/lib/utils';
import { getNewProjectName } from '../../utils/get-new-project-name';
import { join, relative } from 'path';
import { Schema } from '../schema';

View File

@ -0,0 +1,8 @@
/**
* Replaces slashes with dashes
*
* @param path
*/
export function getNewProjectName(path: string): string {
return path.replace(/\//g, '-');
}