How to use the @angular/cli/utilities/config.getWorkspace function in @angular/cli

To help you get started, we’ve selected a few @angular/cli 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 JetBrains / intellij-plugins / AngularJS / src / ngCli / schematicsProvider90.ts View on Github external
const schematicsProvider: Promise = (async function () {
  let workspace = await getWorkspace('local');
  let command = new (SchematicCommand as any)({workspace: workspace}, null, null);
  let {listSchematicNames} = (await command.createWorkflow({interactive: false})).engineHost;
  let defaultSchematicCollection = await command.getDefaultSchematicCollection()

  return {
    getCollection(collectionName: string): Collection {
      return command.getCollection(collectionName);
    },
    listSchematics(collection): string[] {
      return listSchematicNames(collection.description)
    },
    getSchematic(collection: Collection, schematicName: string, allowPrivate?: boolean): Schematic {
      return command.getSchematic(collection, schematicName, allowPrivate);
    },
    getDefaultSchematicCollection() {
      return defaultSchematicCollection;
github JetBrains / intellij-plugins / AngularJS / gen / ngCli / schematicsProvider80.js View on Github external
"use strict";
const schematic_command_1 = require("@angular/cli/models/schematic-command");
const config_1 = require("@angular/cli/utilities/config");
let workspace = config_1.getWorkspace();
if (!workspace || !workspace.root)
    throw new Error("Try 9.0 provider");
let command = new schematic_command_1.SchematicCommand({ workspace }, null, null);
let engineHost = command.createWorkflow({ interactive: false }).engineHost;
const schematicsProvider = Promise.resolve({
    getCollection(collectionName) {
        return command.getCollection(collectionName);
    },
    listSchematics(collection) {
        return engineHost.listSchematics(collection);
    },
    getSchematic(collection, schematicName, allowPrivate) {
        return command.getSchematic(collection, schematicName, allowPrivate);
    },
    getDefaultSchematicCollection() {
        return command.getDefaultSchematicCollection();
github NationalBankBelgium / stark / packages / stark-build / config / ng-cli-utils.js View on Github external
function getWorkspace() {
	return cliUtilConfig.getWorkspace();
}
github JetBrains / intellij-plugins / AngularJS / gen / ngCli / schematicsProvider90.js View on Github external
const schematicsProvider = (async function () {
    let workspace = await config_1.getWorkspace('local');
    let command = new schematic_command_1.SchematicCommand({ workspace: workspace }, null, null);
    let { listSchematicNames } = (await command.createWorkflow({ interactive: false })).engineHost;
    let defaultSchematicCollection = await command.getDefaultSchematicCollection();
    return {
        getCollection(collectionName) {
            return command.getCollection(collectionName);
        },
        listSchematics(collection) {
            return listSchematicNames(collection.description);
        },
        getSchematic(collection, schematicName, allowPrivate) {
            return command.getSchematic(collection, schematicName, allowPrivate);
        },
        getDefaultSchematicCollection() {
            return defaultSchematicCollection;
        }