samedi 26 décembre 2015

Ember addon to add files to root directory

I have an addon which needs to copy a set of JS files from their bower directory to the Ember app's root of /dist (this is for scoping rules associated with service workers). I thought maybe I could use the treeForApp hook but while I'm getting no errors I'm also not getting the desired result.

The index.js is:

const Funnel = require('broccoli-funnel');

module.exports = {
  name: 'ember-upup',
  treeForApp: function(tree) {
    tree = new Funnel(tree, { include: 
      [ 
        'bower_components/upup/dist/upup.min.js',
        'bower_components/upup/dist/upup.sw.min.js' 
      ]});

    return this._super.treeForApp.call(this, tree);
  },




Aucun commentaire:

Enregistrer un commentaire