Created
October 7, 2017 20:52
-
-
Save toranb/874b8faad7f138baf3b4b371adc4b2ad to your computer and use it in GitHub Desktop.
post processing css with ember-cli to work around libsass blocker
This file contains hidden or 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
/* eslint-env node */ | |
'use strict'; | |
const path = require('path'); | |
const replace = require('broccoli-replace'); | |
const Merge = require('broccoli-merge-trees'); | |
module.exports = { | |
name: 'replacc', | |
included: function (app) { | |
this._super.included.apply(this, arguments); | |
}, | |
postprocessTree: function (type, tree) { | |
if (type !== 'css') { return tree; } | |
return replace(tree, { | |
files: ['assets/*.css'], | |
patterns: [ | |
{ | |
match: /rgbx/g, | |
replacement: "rgba" | |
} | |
] | |
}); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment