cleanup(angular): use our own pipe for scam-pipe (#15717)

This commit is contained in:
Colum Ferry 2023-03-16 16:11:52 +00:00 committed by GitHub
parent 5ac7243d4a
commit 942f984231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,20 +9,16 @@ import { getPipeFileInfo } from '../utils/file-info';
import { pathStartsWith } from '../utils/path'; import { pathStartsWith } from '../utils/path';
import { convertPipeToScam, normalizeOptions } from './lib'; import { convertPipeToScam, normalizeOptions } from './lib';
import type { Schema } from './schema'; import type { Schema } from './schema';
import { pipeGenerator } from '../pipe/pipe';
export async function scamPipeGenerator(tree: Tree, rawOptions: Schema) { export async function scamPipeGenerator(tree: Tree, rawOptions: Schema) {
const options = normalizeOptions(tree, rawOptions); const options = normalizeOptions(tree, rawOptions);
const { inlineScam, projectSourceRoot, ...schematicOptions } = options; const { inlineScam, projectSourceRoot, ...pipeOptions } = options;
checkPathUnderProjectRoot(tree, options); checkPathUnderProjectRoot(tree, options);
const { wrapAngularDevkitSchematic } = require('@nrwl/devkit/ngcli-adapter'); await pipeGenerator(tree, {
const angularPipeSchematic = wrapAngularDevkitSchematic( ...pipeOptions,
'@schematics/angular',
'pipe'
);
await angularPipeSchematic(tree, {
...schematicOptions,
skipImport: true, skipImport: true,
export: false, export: false,
standalone: false, standalone: false,