How to use the ember-cli/lib/models/blueprint.prototype function in ember-cli

To help you get started, we’ve selected a few ember-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 kimroen / ember-cli-coffeescript / blueprints / resource / index.js View on Github external
.then(function() {
        var testBlueprint = mainBlueprint.lookupBlueprint(name + '-test', {
          ui: thisBlueprint.ui,
          analytics: thisBlueprint.analytics,
          project: thisBlueprint.project,
          paths: thisBlueprint.project.blueprintLookupPaths(),
          ignoreMissing: true
        });

        if (!testBlueprint) { return; }

        if (testBlueprint.locals === Blueprint.prototype.locals) {
          testBlueprint.locals = function(options) {
            return mainBlueprint.locals(options);
          };
        }

        return testBlueprint[type](options);
      });
  },
github angular / angular-cli / packages / angular-cli / blueprints / directive / index.js View on Github external
const path = require('path');
const dynamicPathParser = require('../../utilities/dynamic-path-parser');
const stringUtils = require('ember-cli-string-utils');
const astUtils = require('../../utilities/ast-utils');
const findParentModule = require('../../utilities/find-parent-module').default;
const NodeHost = require('@angular-cli/ast-tools').NodeHost;
const Blueprint = require('ember-cli/lib/models/blueprint');
const getFiles = Blueprint.prototype.files;

module.exports = {
  description: '',

  availableOptions: [
    { name: 'flat', type: Boolean, default: true },
    { name: 'prefix', type: Boolean, default: true },
    { name: 'spec', type: Boolean }
  ],

  beforeInstall: function() {
    try {
      this.pathToModule = findParentModule(this.project, this.dynamicPath.dir);
    } catch(e) {
      throw `Error locating module for declaration\n\t${e}`;
    }
github angular / angular-cli / packages / angular-cli / blueprints / component / index.js View on Github external
const path = require('path');
const chalk = require('chalk');
const Blueprint = require('ember-cli/lib/models/blueprint');
const dynamicPathParser = require('../../utilities/dynamic-path-parser');
const findParentModule = require('../../utilities/find-parent-module').default;
const getFiles = Blueprint.prototype.files;
const stringUtils = require('ember-cli-string-utils');
const astUtils = require('../../utilities/ast-utils');
const NodeHost = require('@angular-cli/ast-tools').NodeHost;

module.exports = {
  description: '',

  availableOptions: [
    { name: 'flat', type: Boolean, default: false },
    { name: 'inline-template', type: Boolean, aliases: ['it'] },
    { name: 'inline-style', type: Boolean, aliases: ['is'] },
    { name: 'prefix', type: Boolean, default: true },
    { name: 'spec', type: Boolean }
  ],

  beforeInstall: function() {
github angular / angular-cli / packages / angular-cli / blueprints / pipe / index.js View on Github external
const path = require('path');
const dynamicPathParser = require('../../utilities/dynamic-path-parser');
const stringUtils = require('ember-cli-string-utils');
const astUtils = require('../../utilities/ast-utils');
const findParentModule = require('../../utilities/find-parent-module').default;
const NodeHost = require('@angular-cli/ast-tools').NodeHost;
const Blueprint = require('ember-cli/lib/models/blueprint');
const getFiles = Blueprint.prototype.files;

module.exports = {
  description: '',

  availableOptions: [
    { name: 'flat', type: Boolean, default: true },
    { name: 'spec', type: Boolean }
  ],

  beforeInstall: function() {
    try {
      this.pathToModule = findParentModule(this.project, this.dynamicPath.dir);
    } catch(e) {
      throw `Error locating module for declaration\n\t${e}`;
    }
  },
github pixelhandler / ember-jsonapi-resources / blueprints / jsonapi-resource / index.js View on Github external
.then(function() {
        if (name === 'addon-import') { return; }
        var testBlueprint = mainBlueprint.lookupBlueprint(name + '-test', {
          ui: this.ui,
          analytics: this.analytics,
          project: this.project,
          ignoreMissing: true
        });

        if (!testBlueprint) { return; }

        if (testBlueprint.locals === Blueprint.prototype.locals) {
          testBlueprint.locals = function(options) {
            return mainBlueprint.locals(options);
          };
        }

        return testBlueprint[type](options);
      });
  },