How to use the @angular-devkit/schematics.noop function in @angular-devkit/schematics

To help you get started, we’ve selected a few @angular-devkit/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 ngxs / schematics / src / factories / ng-add / ng-add.factory.ts View on Github external
export function ngAdd(options: NgxsPackageSchema): Rule {
  return chain([
    addNgxsPackageToPackageJson(),
    setSchematicsAsDefault(),
    finallyLog(),
    options.skipInstall ? noop() : runNpmPackageInstall()
  ]);
}
github nrwl / nx / packages / react / src / schematics / application / application.ts View on Github external
function addCypress(options: NormalizedSchema): Rule {
  return options.e2eTestRunner === 'cypress'
    ? externalSchematic('@nrwl/cypress', 'cypress-project', {
        ...options,
        name: options.name + '-e2e',
        directory: options.directory,
        project: options.projectName
      })
    : noop();
}
github nrwl / nx / packages / workspace / src / schematics / preset / preset.ts View on Github external
function createPreset(options: Schema): Rule {
  const linter = options.cli === 'angular' ? 'tslint' : 'eslint';

  if (options.preset === 'empty') {
    return noop();
  } else if (options.preset === 'angular') {
    return chain([
      externalSchematic(
        '@nrwl/angular',
        'application',
        {
          name: options.name,
          style: options.style
        },
        { interactive: false }
      ),
      setDefaultCollection('@nrwl/angular')
    ]);
  } else if (options.preset === 'react') {
    return chain([
      externalSchematic(
github nstudio / xplat / packages / workspace / src / utils / xplat.ts View on Github external
export function addLibFiles(
  tree: Tree,
  options: IXplatSchema
) {

  if (
    tree.exists(`libs/core/base/base-component.ts`) ||
    tree.exists(`libs/features/index.ts`)
  ) {
    return noop();
  }

  return branchAndMerge(
    mergeWith(
      apply(url(`./_lib_files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions()
        }),
        move('libs')
      ])
    )
  );
}
github devonfw / devon4node / packages / schematics / src / lib / service / service.factory.ts View on Github external
export function main(options: IServiceOptions): Rule {
  const name = strings.dasherize(basename(options.name as Path));
  const projectPath = options.path || '.';
  const path: Path = strings.dasherize(normalize(join(projectPath as Path, 'src/app', options.name, '..'))) as Path;

  return chain([
    mergeWith(
      apply(url('./files'), [
        options.spec ? noop() : filter(p => !p.endsWith('.spec.ts')),
        template({
          ...strings,
          name,
        }),
        formatTsFiles(),
        move(path),
      ]),
    ),
    (tree: Tree): Tree => {
      addBarrels(tree, join(path, 'services'), name + '.service');
      return tree;
    },
    updateModule(name, path),
  ]);
}
github nrwl / nx / packages / react / src / schematics / component / component.ts View on Github external
function addStyledModuleDependencies(options: NormalizedSchema): Rule {
  const extraDependencies = CSS_IN_JS_DEPENDENCIES[options.styledModule];

  return extraDependencies
    ? addDepsToPackageJson(
        extraDependencies.dependencies,
        extraDependencies.devDependencies
      )
    : noop();
}
github nstudio / xplat / packages / workspace / src / utils / xplat.ts View on Github external
export function addPlatformFiles(
  tree: Tree,
  options: IXplatSchema,
  platform: string
) {
  if (tree.exists(`xplat/${platform}/core/index.ts`)) {
    return noop();
  }

  return branchAndMerge(
    mergeWith(
      apply(url(`./_files`), [
        template({
          ...(options as any),
          ...getDefaultTemplateOptions()
        }),
        move(`xplat/${platform}`)
      ])
    )
  );
}
github nestjs / schematics / src / lib / class / class.factory.ts View on Github external
function generate(options: ClassOptions): Source {
  return apply(url(join('./files' as Path, options.language)), [
    options.spec === 'true'
      ? noop()
      : filter(path => !path.endsWith('.spec.ts')),
    template({
      ...strings,
      ...options,
    }),
    move(options.path),
  ]);
}
github datorama / akita / schematics / src / ng-add / index.js View on Github external
function akitaNgAdd(options) {
    return schematics_1.chain([
        options && options.skipPackageJson ? schematics_1.noop() : addPackageJsonDependencies(options),
        options && options.skipPackageJson ? schematics_1.noop() : installPackageJsonDependencies(),
        addModuleToImports(options),
        injectImports(options),
        setSchematicsAsDefault(),
        log()
    ]);
}
exports.akitaNgAdd = akitaNgAdd;
github mdbootstrap / Angular-Bootstrap-with-Material-Design / projects / schematics / src / ng-add / index.ts View on Github external
export function ngAdd(options: any): Rule {
  return chain([
    options && options.skipPackageJson ? noop() : addPackageJsonDependencies(),
    options && options.skipPackageJson ? noop() : installPackageJsonDependencies(),
    options && options.skipModuleImport ? noop() : addModuleToImports(options),
    updateModuleWithForRootMethod(),
    addStylesAndScriptsToAngularJson(options)
  ]);
}