How to use the ember-cli/lib/broccoli/ember-app.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 duizendnegen / ember-cli-lazy-load / ember-app.js View on Github external
var options;

    if(arguments.length == 2){
        options = arguments[1]
    }else if(arguments.length == 1) {
        options = arguments[0]
    }else {
        options = {}
    }

    this.bundleCofig = options.bundles ? options.bundles : {}

};

EmberAppBundle.prototype = Object.create(EmberApp.prototype);
EmberAppBundle.prototype.constructor = EmberAppBundle;


EmberAppBundle.prototype.javascript = function(){
    var deprecate           = this.project.ui.writeDeprecateLine.bind(this.project.ui);
    var applicationJs       = this.appAndDependencies();
    var appOutputPath       = this.options.outputPaths.app.js;
    var appJs               = applicationJs;

    // Note: If ember-cli-babel is installed we have already performed the transpilation at this point
    if (!this._addonInstalled('ember-cli-babel')) {
        appJs = new Babel(
            new Funnel(applicationJs, {
                include: [escapeRegExp(this.name + '/') + '**/*.js'],
                annotation: 'Funnel: App JS Files'
            }),
github ef4 / ember-giftwrap / src / stub-app.js View on Github external
/* jshint node: true */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');

function StubApp(options) {
  EmberApp.call(this, options);
}
StubApp.prototype = Object.create(EmberApp.prototype);
StubApp.prototype.constructor = StubApp;

// We don't want any of the default legacy files. But we *do* still
// want to let addons stick their own imports into the
// legacyFilesToAppend list.
StubApp.prototype.populateLegacyFiles = function() {};


module.exports = StubApp;
github glimmerjs / glimmer-application-pipeline / lib / broccoli / glimmer-app.js View on Github external
if (arguments.length === 0) {
    options = {};
  } else if (arguments.length === 1) {
    options = defaults;
  } else {
    defaultsDeep(options, defaults);
  }

  this.appConstructor(defaultsDeep(options, DEFAULT_CONFIG));
}

GlimmerApp.__proto__ = EmberApp;

GlimmerApp.prototype = Object.create(EmberApp.prototype);
GlimmerApp.prototype.constructor = GlimmerApp;
GlimmerApp.prototype.appConstructor = EmberApp.prototype.constructor;

GlimmerApp.prototype.toTree = function(options) {
  var projectDir = process.cwd();
  var projectFolder = this.projectFolder = (options && options.projectFolder || 'src');
  var srcDir = projectDir + '/' + projectFolder;

  console.log('Building app tree:', srcDir);

  if (process.env.EMBER_ENV !== 'production') {
    rimraf.sync('dist');
  }

  var tsOptions = {
    tsconfig: {
      compilerOptions: {
        target: "es5",
github glimmerjs / glimmer-application-pipeline / lib / broccoli / glimmer-app.js View on Github external
*/
function GlimmerApp(defaults, options) {
  if (arguments.length === 0) {
    options = {};
  } else if (arguments.length === 1) {
    options = defaults;
  } else {
    defaultsDeep(options, defaults);
  }

  this.appConstructor(defaultsDeep(options, DEFAULT_CONFIG));
}

GlimmerApp.__proto__ = EmberApp;

GlimmerApp.prototype = Object.create(EmberApp.prototype);
GlimmerApp.prototype.constructor = GlimmerApp;
GlimmerApp.prototype.appConstructor = EmberApp.prototype.constructor;

GlimmerApp.prototype.toTree = function(options) {
  var projectDir = process.cwd();
  var projectFolder = this.projectFolder = (options && options.projectFolder || 'src');
  var srcDir = projectDir + '/' + projectFolder;

  console.log('Building app tree:', srcDir);

  if (process.env.EMBER_ENV !== 'production') {
    rimraf.sync('dist');
  }

  var tsOptions = {
    tsconfig: {
github MiguelMadero / ember-cli-bundle-loader / lib / broccoli / ember-app-with-packages.js View on Github external
}
    var content = [];
    if (type === 'app-boot') {
      content.push('define(\'ember-cli-bundle-loader/config/bundles\', function() { ');
      content.push('  return ' + JSON.stringify(bundles));
      content.push('});');

      content.push('define(\'ember-cli-bundle-loader/config/package-names\', function() { ');
      content.push('  return ' + JSON.stringify(packageNames));
      content.push('});');

      content = content.concat(
        EmberApp.prototype.contentFor.call(this, config, match, type));
      return content.join('\n');
    } else {
      return EmberApp.prototype.contentFor.call(this, config, match, type);
    }
  };