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

Plain CSS usage generates pod-styles.css outside of assets dir #47

Closed
ebryn opened this issue Apr 20, 2015 · 7 comments
Closed

Plain CSS usage generates pod-styles.css outside of assets dir #47

ebryn opened this issue Apr 20, 2015 · 7 comments

Comments

@ebryn
Copy link
Collaborator

ebryn commented Apr 20, 2015

It appears that plain CSS usage generates a /pod-styles.css file at the root of the application rather than inside of the /assets directory.

@trentmwillis
Copy link
Contributor

If someone wants to pick this up before I can get to it, this should be a simple logic check around the fs.writeFileSync.

@dfreeman
Copy link
Contributor

It also looks like app/styles is getting funneled directly into dist now, too. Guessing that's related to #44?

I don't think I have my head fully wrapped around the intended tree state at various points in the process right now, but it feels like the "with preprocessor" and "without preprocessor" cases are getting a little jumbled together and making it harder to reason about this kind of thing.

@trentmwillis
Copy link
Contributor

@dfreeman with vanilla CSS, I believe app/styles always gets funneled into dist. Even without this add-on.

@dfreeman
Copy link
Contributor

In a freshly ember newed app, I don't see an app directory in dist at all.

$ ls -R dist
dist:
assets  crossdomain.xml  index.html  robots.txt  testem.js  tests

dist/assets:
ember-data.js.map  passed.png      test-support.css  test-support.map  vanilla.js   vendor.css  vendor.map
failed.png         test-loader.js  test-support.js   vanilla.css       vanilla.map  vendor.js

dist/tests:
index.html

c.f.

$ ember install ember-component-css && ember build && ls -R dist
# ... snip ...
dist:
app  assets  crossdomain.xml  index.html  pod-styles.  robots.txt  testem.js  tests

dist/app:
styles

dist/app/styles:
app.css

dist/assets:
ember-data.js.map  failed.png  passed.png  test-loader.js  test-support.css  test-support.js  test-support.map  vanilla.js  vanilla.map  vendor.css  vendor.js  vendor.map

dist/tests:
index.html

@trentmwillis
Copy link
Contributor

Hmm, okay. I tested it as well, by default Ember does add all the CSS files into dist/assets, e.g., app/styles/components/styles.css goes to assets/components/styles.css. However, for preprocessors we need the files to still be in app/styles for importing.

So it seems like we have two cases: plain CSS should route all files to assets but any preprocessor files should be routed app/styles; does that sound right? How should we approach this?

@igorpreston
Copy link

As of now, I confirm that this error is still here. Any updates on fixing?

@webark
Copy link
Owner

webark commented Oct 26, 2016

you now need to use a postcss import (or equivalent) in order to use with plain css files. The readme has an explanation on how to do this.

@webark webark closed this as completed Oct 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants