Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Update 3rd party code example with dependencies #106

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion markdown/docs/addon-author-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ Node compatible, you can wrap it with a check as below in an addon:

```js
var map = require('broccoli-stew').map;
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');

treeForVendor(defaultTree) {
var browserVendorLib = new Funnel(<path to your third party lib>);
Expand All @@ -206,7 +208,7 @@ treeForVendor(defaultTree) {
return new mergeTrees([defaultTree, browserVendorLib]);
}

included() {
included(app) {
// this file will be loaded in FastBoot but will not be eval'd
app.import('vendor/<third party lib file name>.js');
}
Expand Down