cleanup(angular): remove deep import to nrwl/workspace for getNewProjectName (#15494)
This commit is contained in:
parent
e394220e10
commit
14f0f38ee1
@ -5,7 +5,7 @@ import {
|
|||||||
Tree,
|
Tree,
|
||||||
visitNotIgnoredFiles,
|
visitNotIgnoredFiles,
|
||||||
} from '@nrwl/devkit';
|
} 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 { join } from 'path';
|
||||||
import { Schema } from '../schema';
|
import { Schema } from '../schema';
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import {
|
|||||||
updateJson,
|
updateJson,
|
||||||
workspaceRoot,
|
workspaceRoot,
|
||||||
} from '@nrwl/devkit';
|
} 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 { join, relative } from 'path';
|
||||||
import { Schema } from '../schema';
|
import { Schema } from '../schema';
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* Replaces slashes with dashes
|
||||||
|
*
|
||||||
|
* @param path
|
||||||
|
*/
|
||||||
|
export function getNewProjectName(path: string): string {
|
||||||
|
return path.replace(/\//g, '-');
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user