-
Notifications
You must be signed in to change notification settings - Fork 25
/
index.js
32 lines (25 loc) · 831 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
24
25
26
27
28
29
30
31
32
'use strict';
var path = require('path');
var fs = require('fs');
var autoprefixer = require('broccoli-autoprefixer');
var defaults = require('lodash').defaults;
function EmberCLIAutoprefixer(project) {
this.project = project;
this.name = 'Ember CLI Autoprefixer';
}
EmberCLIAutoprefixer.prototype.postprocessTree = function (type, tree) {
if ((type === 'all' || type === 'styles') && this.enabled) {
tree = autoprefixer(tree, this.options);
}
return tree;
};
EmberCLIAutoprefixer.prototype.included = function included(app) {
this.app = app;
this.options = defaults(this.app.options.autoprefixer || {}, {
enabled: true
});
this.enabled = this.options.enabled;
delete this.options.enabled;
};
EmberCLIAutoprefixer.prototype.treeFor = function treeFor() {};
module.exports = EmberCLIAutoprefixer;