Skip to content

Instantly share code, notes, and snippets.

@toranb
Created October 7, 2017 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toranb/874b8faad7f138baf3b4b371adc4b2ad to your computer and use it in GitHub Desktop.
Save toranb/874b8faad7f138baf3b4b371adc4b2ad to your computer and use it in GitHub Desktop.
post processing css with ember-cli to work around libsass blocker
/* 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