-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathember-cli-build.js
More file actions
33 lines (29 loc) · 801 Bytes
/
ember-cli-build.js
File metadata and controls
33 lines (29 loc) · 801 Bytes
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
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const isProduction = EmberApp.env() === 'production';
const purgeCSS = {
module: require('@fullhuman/postcss-purgecss'),
options: {
content: [
'./app/index.html',
'./app/templates/**/*.hbs',
'./app/components/**/*.hbs',
],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
}
}
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
postcssOptions: {
compile: {
plugins: [
require('postcss-import'),
require('tailwindcss')('./app/tailwind/config.js'),
// messes up code highlighting in snippets
// ...isProduction ? [purgeCSS] : []
]
}
}
});
return app.toTree();
};