How to use the @nrwl/schematics.names function in @nrwl/schematics

To help you get started, we’ve selected a few @nrwl/schematics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nrwl / nx / packages / bazel / src / lib / index.ts View on Github external
export default function(options: any): Rule {
  const fullPath = path.join(options.directory, toFileName(options.name), options.sourceDir);

  const templateSource = apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' })]);

  return chain([branchAndMerge(chain([mergeWith(templateSource), addLibToAngularCliJson(fullPath, options)]))]);
}
github nrwl / nx / packages / bazel / src / workspace / index.ts View on Github external
export default function(options: Schema): Rule {
  return chain([
    mergeWith(
      apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' }), move(options.name!)])
    )
  ]);
}
github nrwl / nx / packages / bazel / src / nglib / index.ts View on Github external
export default function(options: any): Rule {
  const fullPath = path.join(options.directory, toFileName(options.name), options.sourceDir);

  const templateSource = apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' })]);

  return chain([branchAndMerge(chain([mergeWith(templateSource), addLibToAngularCliJson(fullPath, options)]))]);
}
github nrwl / nx / packages / bazel / src / app / index.ts View on Github external
export default function(options: Schema): Rule {
  const fullPath = path.join(options.directory, toFileName(options.name), options.sourceDir);
  return chain([
    mergeWith(apply(url('./files'), [template({ ...options, ...names(options.name), dot: '.', tmpl: '' })])),
    externalSchematic('@schematics/angular', 'module', {
      name: 'app',
      commonModule: false,
      flat: true,
      routing: options.routing,
      sourceDir: fullPath,
      spec: false
    }),
    externalSchematic('@schematics/angular', 'component', {
      name: 'app',
      selector: `${options.prefix}-root`,
      sourceDir: fullPath,
      flat: true,
      inlineStyle: options.inlineStyle,
      inlineTemplate: options.inlineTemplate,
      spec: !options.skipTests,