{"size": 1373, "ext": "js", "max_stars_repo_path": "ember-cli-build.js", "max_stars_repo_name": "surebase/ember-jsonapi-resources", "max_stars_repo_stars_event_min_datetime": "2015-06-01T20:50:40.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-21T18:35:51.000Z", "max_issues_repo_path": "ember-cli-build.js", "max_issues_repo_name": "surebase/ember-jsonapi-resources", "max_issues_repo_issues_event_min_datetime": "2015-06-01T01:07:20.000Z", "max_issues_repo_issues_event_max_datetime": "2017-05-08T07:50:55.000Z", "max_forks_repo_path": "ember-cli-build.js", "max_forks_repo_name": "surebase/ember-jsonapi-resources", "max_forks_repo_forks_event_min_datetime": "2015-06-02T11:48:41.000Z", "max_forks_repo_forks_event_max_datetime": "2021-08-19T20:01:15.000Z"}
{"max_stars_count": 148, "max_issues_count": 77, "max_forks_count": 21, "avg_line_length": 25.4259259259, "max_line_length": 81, "alphanum_fraction": 0.6256372906}
/*jshint node:true*/
/* global require, module */
var EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
var pickFiles = require('broccoli-static-compiler');
var compileES6 = require('broccoli-es6-concatenator');
var jsonToModule = require('./lib/json-to-module');

module.exports = function(defaults) {
  var app = new EmberAddon(defaults);

  /*
    This build file specifies the options for the dummy test app of this
    addon, located in `/tests/dummy`
    This build file does *not* influence how the addon or the app using it
    behave. You most likely want to be modifying `./index.js` or app's build file
  */

  var buildTrees = [];

  if (app.tests) {

    app.import({
      development: app.bowerDirectory + '/es5-shim/es5-shim.js',
      production: app.bowerDirectory + '/es5-shim/es5-shim.min.js'
    });

    var sinon = pickFiles(app.bowerDirectory + '/sinon', {
      srcDir: '/',
      files: ['index.js'],
      destDir: '/assets/sinon'
    });

    buildTrees.push(sinon);

    var mocks = pickFiles('fixtures', {
      srcDir: '/',
      files: ['**/*.json'],
      destDir: '/fixtures'
    });

    var mocksJs = compileES6(jsonToModule(mocks), {
      inputFiles: [
        '**/*.js'
      ],
      wrapInEval: false,
      outputFile: '/assets/fixtures.js'
    });

    buildTrees.push(mocksJs);
  }

  return app.toTree(buildTrees);
};
