How to use @nrwl/schematics - 10 common examples

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 OasisDigital / angular-enterprise-example / protractor.conf.js View on Github external
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
const { getAppDirectoryUsingCliConfig } = require('@nrwl/schematics/src/utils/cli-config-utils');
const appDir = getAppDirectoryUsingCliConfig();

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    appDir + '/e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
github nrwl / nx / packages / schematics / src / collection / application / files / __directory__ / protractor.conf.js View on Github external
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
const { getAppDirectoryUsingCliConfig } = require('@nrwl/schematics/src/utils/cli-config-utils');
const appDir = getAppDirectoryUsingCliConfig();

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    appDir + '/e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
github nrwl / nx / packages / bazel / src / collection / application / files / __directory__ / protractor.conf.js View on Github external
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
const { getAppDirectoryUsingCliConfig } = require('@nrwl/schematics/src/utils/cli-config-utils');
const appDir = getAppDirectoryUsingCliConfig();

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    appDir + '/e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:8080/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
github WeAreOpenSourceProjects / NodeAngular / protractor.conf.js View on Github external
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');
const { getAppDirectoryUsingCliConfig } = require('@nrwl/schematics/src/utils/cli-config-utils');
const appDir = getAppDirectoryUsingCliConfig();

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    appDir + '/e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  baseUrl: 'http://localhost:4200/',
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function() {}
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,
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 / 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)]))]);
}