How to use the @ngrx/store-devtools/schematics-core.parseName function in @ngrx/store-devtools

To help you get started, we’ve selected a few @ngrx/store-devtools 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 ngrx / platform / modules / store-devtools / schematics / ng-add / index.ts View on Github external
return (host: Tree, context: SchematicContext) => {
    options.path = getProjectPath(host, options);

    if (options.module) {
      options.module = findModuleFromOptions(host, {
        name: '',
        module: options.module,
        path: options.path,
      });
    }

    const parsedPath = parseName(options.path, '');
    options.path = parsedPath.path;

    if (options.maxAge! < 0 || options.maxAge === 1) {
      throw new SchematicsException(
        `maxAge should be an integer greater than 1.`
      );
    }

    return chain([
      branchAndMerge(chain([addImportToNgModule(options)])),
      options && options.skipPackageJson
        ? noop()
        : addNgRxStoreDevToolsToPackageJson(),
    ])(host, context);
  };
}
github ngrx / store-devtools-builds / schematics / ng-add / index.js View on Github external
return (host, context) => {
            options.path = schematics_core_1.getProjectPath(host, options);
            if (options.module) {
                options.module = schematics_core_1.findModuleFromOptions(host, {
                    name: '',
                    module: options.module,
                    path: options.path,
                });
            }
            const parsedPath = schematics_core_1.parseName(options.path, '');
            options.path = parsedPath.path;
            if (options.maxAge < 0 || options.maxAge === 1) {
                throw new schematics_1.SchematicsException(`maxAge should be an integer greater than 1.`);
            }
            return schematics_1.chain([
                schematics_1.branchAndMerge(schematics_1.chain([addImportToNgModule(options)])),
                options && options.skipPackageJson
                    ? schematics_1.noop()
                    : addNgRxStoreDevToolsToPackageJson(),
            ])(host, context);
        };
    }