Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if style file with project name exists #3642

Merged
merged 2 commits into from
Mar 26, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/broccoli/ember-app.js
Expand Up @@ -13,6 +13,7 @@ var EOL = require('os').EOL;
var Project = require('../models/project');
var cleanBaseURL = require('../utilities/clean-base-url');
var escapeRegExp = require('../utilities/escape-regexp');
var SilentError = require('../errors/silent');

var preprocessJs = p.preprocessJs;
var preprocessCss = p.preprocessCss;
Expand Down Expand Up @@ -904,6 +905,10 @@ EmberApp.prototype.javascript = function() {
@return {Tree} Merged tree for styles
*/
EmberApp.prototype.styles = function() {
if (fs.existsSync('app/styles/' + this.name + '.css')) {
throw new SilentError('Style file cannot have the name of the application - ' + this.name);
}

var addonTrees = this.addonTreesFor('styles');
var external = this._processedExternalTree();
var styles = pickFiles(this.trees.styles, {
Expand Down