Charles Lyding 291bbffcc9 refactor(@schematics/angular): use string helper re-export from @angular-devkit/schematics
By using the `strings` re-export from `@angular-devkit/schematics` instead of from `@angular-devkit/core`,
the number of imports from `@angular-devkit/core` has been reduced and lowers the direct dependency count
for many of the individual schematics.
2022-04-22 11:31:53 -04:00

35 lines
786 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {
Rule,
apply,
applyTemplates,
filter,
mergeWith,
noop,
strings,
url,
} from '@angular-devkit/schematics';
import { latestVersions } from '../utility/latest-versions';
import { Schema as WorkspaceOptions } from './schema';
export default function (options: WorkspaceOptions): Rule {
return mergeWith(
apply(url('./files'), [
options.minimal ? filter((path) => !path.endsWith('editorconfig.template')) : noop(),
applyTemplates({
utils: strings,
...options,
'dot': '.',
latestVersions,
}),
]),
);
}