How to use the ember-cli/lib/models/blueprint.lookup 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 pixelhandler / ember-jsonapi-resources / blueprints / jsonapi-resource / index.js View on Github external
_processBlueprint: function(type, name, options) {
    var mainBlueprint = Blueprint.lookup(name, {
      ui: this.ui,
      analytics: this.analytics,
      project: this.project,
      // need to check blueprint paths from addons
      paths: options.paths || [ path.resolve(__dirname, '..', '..', 'blueprints') ]
    });

    return Promise.resolve()
      .then(function() {
        return mainBlueprint[type](options);
      })
      .then(function() {
        if (name === 'addon-import') { return; }
        var testBlueprint = mainBlueprint.lookupBlueprint(name + '-test', {
          ui: this.ui,
          analytics: this.analytics,
github offirgolan / ember-addon-genie / lib / utils / utils.js View on Github external
processBlueprint: function(type, name, options, extras) {
    // TODO remove this private ember-cli usage - will break in future versions of ember-cli
    var Blueprint = require('ember-cli/lib/models/blueprint');
    var bluePrint = Blueprint.lookup(name, {
      paths: [ path.resolve(this.path, '../') ]
    });

    Object.keys(extras || {}).forEach(function(k) {
      bluePrint[k] = extras[k];
    });

    return Promise.resolve().then(function() {
       return bluePrint[type](merge({}, options));
     });
  },
github kimroen / ember-cli-coffeescript / blueprints / resource / index.js View on Github external
_processBlueprint: function(type, name, options) {
    var mainBlueprint = Blueprint.lookup(name, {
      ui: this.ui,
      analytics: this.analytics,
      project: this.project,
      paths: this.project.blueprintLookupPaths()
    });

    var thisBlueprint = this;

    return RSVP.Promise.resolve()
      .then(function() {
        return mainBlueprint[type](options);
      })
      .then(function() {
        var testBlueprint = mainBlueprint.lookupBlueprint(name + '-test', {
          ui: thisBlueprint.ui,
          analytics: thisBlueprint.analytics,
github kimroen / ember-cli-coffeescript / lib / utilities / ancestral-blueprint.js View on Github external
module.exports = function(dasherizedName, project) {
  var projectPaths = project ? project.blueprintLookupPaths() : [];

  projectPaths = projectPaths.filter(function(p) {
    return p !== coffeeScriptPath;
  });

  projectPaths = projectPaths.concat(legacyBlueprintsPath());

  return Blueprint.lookup(dasherizedName, {
    paths: projectPaths
  });
};
github marcioj / ember-cli-scaffold / lib / blueprint / ext.js View on Github external
invoke: function(name) {
    var blueprint = Blueprint.lookup(name, {
      paths: this.project.blueprintLookupPaths(),
      ui: this.ui,
      analyctics: this.analyctics,
      project: this.project,
      ignoreMissing: true
    });

    return blueprint[this._operation](this._options);
  }
});
github typed-ember / ember-cli-typescript / blueprints / in-repo-addon / index.js View on Github external
beforeInstall(options) {
    let libBlueprint = Blueprint.lookup('lib', {
      ui: this.ui,
      analytics: this.analytics,
      project: this.project,
    });

    return libBlueprint.install(options);
  },