Last active
January 26, 2021 01:21
-
-
Save raido/87a461b896f9281ed574 to your computer and use it in GitHub Desktop.
Ember Addon treeForPublic, so included assets from addon would not be namespaced.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* jshint node: true */ | |
'use strict'; | |
var Funnel = require('broccoli-funnel'); | |
var mergeTrees = require('broccoli-merge-trees'); | |
module.exports = { | |
name: '<your addon>', | |
/** | |
* Override default implementation for treeForPublic, because we want non namespaced assets | |
* | |
* @see https://github.com/ember-cli/ember-cli/blob/master/ADDON_HOOKS.md#treefor-cont | |
*/ | |
treeForPublic: function(tree) { | |
var assetsTree = new Funnel('public'); | |
return mergeTrees([tree, assetsTree], { | |
overwrite: true | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment