Skip to content

Commit

Permalink
Merge pull request #516 from ember-learn/fix-postcss
Browse files Browse the repository at this point in the history
use more standard postcss process
  • Loading branch information
mansona authored Jul 18, 2024
2 parents c6bc82e + ec5a033 commit 40d84f4
Show file tree
Hide file tree
Showing 4 changed files with 593 additions and 632 deletions.
12 changes: 6 additions & 6 deletions addon/styles/helpers/index.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import 'helpers/unstyled.css';
@import 'helpers/embed.css';
@import 'helpers/flex.css';
@import 'helpers/margin.css';
@import 'helpers/padding.css';
@import 'helpers/rounded.css';
@import './unstyled.css';
@import './embed.css';
@import './flex.css';
@import './margin.css';
@import './padding.css';
@import './rounded.css';

.img-fluid {
width: 100%;
Expand Down
40 changes: 30 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,41 @@
'use strict';
const Funnel = require('broccoli-funnel');
const path = require('path');
const staticPostcssAddonTree = require('static-postcss-addon-tree');
const CssImport = require('postcss-import')
const PresetEnv = require('postcss-preset-env');

const plugins = [
{ module: CssImport },
{
module: PresetEnv,
options: {
stage: 3,
features: { 'nesting-rules': true },
}
}
];

module.exports = {
name: require('./package').name,

options: {},

treeForAddon() {
var tree = this._super(...arguments);
options: {
postcssOptions: {
compile: {
enabled: true,
plugins,
}
}
},

return staticPostcssAddonTree(tree, {
addonName: 'ember-styleguide',
addonFolder: __dirname,
project: this.project || this.app.project
});
included: function(app) {
this._super.included.apply(this, arguments);
app.options = app.options || {};
app.options.postcssOptions = {
compile: {
enabled: true,
plugins,
}
}
},

treeForPublic: function() {
Expand Down
Loading

0 comments on commit 40d84f4

Please sign in to comment.