Skip to content

Commit

Permalink
Merge pull request #7992 from twokul/tree-for-styles-regression-master
Browse files Browse the repository at this point in the history
Fix for style processing
  • Loading branch information
twokul committed Aug 28, 2018
2 parents a5ab5cb + 15f9951 commit 5ed87fc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 7 deletions.
1 change: 0 additions & 1 deletion lib/broccoli/ember-app.js
Expand Up @@ -1079,7 +1079,6 @@ class EmberApp {
});

return new Funnel(mergedAddonStyles, {
srcDir: 'app/styles',
allowEmpty: true,
destDir: `${this.name}/styles`,
});
Expand Down
34 changes: 28 additions & 6 deletions tests/unit/broccoli/ember-app-test.js
Expand Up @@ -252,22 +252,38 @@ describe('EmberApp', function() {
}

describe('getAddonStyles()', function() {
it('can handle empty styles folders', co.wrap(function *() {
let app = new EmberApp({
project,
});
app.addonTreesFor = () => [];

let output = yield buildOutput(app.getAddonStyles());
let outputFiles = output.read();

expect(outputFiles['test-project']).to.deep.equal({
styles: { },
});

yield output.dispose();
}));

it('returns add-ons styles files', co.wrap(function *() {
let addonFooStyles = yield createTempDir();
let addonBarStyles = yield createTempDir();

// `ember-basic-dropdown`
addonFooStyles.write({
app: {
styles: {
'foo.css': 'foo',
},
},
});
// `ember-bootstrap`
addonBarStyles.write({
app: {
styles: {
'bar.css': 'bar',
},
baztrap: {
'baztrap.css': '// baztrap.css',
},
});

Expand All @@ -286,8 +302,14 @@ describe('EmberApp', function() {

expect(outputFiles['test-project']).to.deep.equal({
styles: {
'foo.css': 'foo',
'bar.css': 'bar',
app: {
styles: {
'foo.css': 'foo',
},
},
baztrap: {
'baztrap.css': '// baztrap.css',
},
},
});

Expand Down

0 comments on commit 5ed87fc

Please sign in to comment.