-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
54 lines (43 loc) · 1.46 KB
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*jshint node: true */
'use strict';
var checker = require('ember-cli-version-checker');
var path = require('path');
var mergeTrees = require('broccoli-merge-trees');
var Funnel = require('broccoli-funnel');
module.exports = {
name: 'liquid-fire',
init: function() {
checker.assertAbove(this, '0.2.0');
},
treeForVendor: function(tree){
var velocityPath = path.dirname(require.resolve('velocity-animate'));
var velocityTree = new Funnel(this.treeGenerator(velocityPath), {
srcDir: '/',
destDir: 'velocity'
});
var matchMediaPath = path.dirname(require.resolve('match-media'));
var matchMediaTree = new Funnel(this.treeGenerator(matchMediaPath), {
srcDir: '/',
destDir: 'match-media'
});
return mergeTrees([tree, velocityTree, matchMediaTree]);
},
included: function(app){
// see: https://github.com/ember-cli/ember-cli/issues/3718
if (typeof app.import !== 'function' && app.app) {
app = app.app;
}
if (!process.env.EMBER_CLI_FASTBOOT) {
app.import('vendor/velocity/velocity.js');
app.import('vendor/match-media/matchMedia.js');
}
app.import('vendor/liquid-fire.css');
},
setupPreprocessorRegistry: function(type, registry) {
var TransformLiquidWithAsToHash = require('./ext/plugins/transform-liquid-with-as-to-hash');
registry.add('htmlbars-ast-plugin', {
name: "transform-liquid-with-as-to-hash",
plugin: TransformLiquidWithAsToHash
});
}
};