-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.js
23 lines (21 loc) · 844 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* jshint node: true */
'use strict';
var path = require('path');
var map = require('broccoli-stew').map;
var Funnel = require('broccoli-funnel');
var mergeTrees = require('broccoli-merge-trees');
module.exports = {
name: 'ember-maskmoney',
treeForVendor: function(defaultTree) {
var jqueryMaskMoneyJSPath = path.join(this.app.project.root, 'node_modules', 'jquery-maskmoney', 'dist');
var browserVendorLib = new Funnel(jqueryMaskMoneyJSPath, {
files: ['jquery.maskMoney.min.js']
});
browserVendorLib = map(browserVendorLib, (content) => `if (typeof FastBoot === 'undefined') { ${content} }`);
return defaultTree ? new mergeTrees([defaultTree, browserVendorLib]) : browserVendorLib;
},
included(app) {
this._super.included.apply(this, arguments);
app.import('vendor/jquery.maskMoney.min.js');
}
};