Comments (6)
Hey @mansona!
Is the goal to be able to use postcss for authoring the addon's styles, but without a need to modify them in the app that consumes the addon? If so, as long as you create your styles in addon/styles/addon.css
and setup the build config for your addon to process postcss those styles should end up in vendor.css
of the consuming app.
You can see a good example of this configuration and setup in one of the cardstack repos here: https://github.com/cardstack/cardstack/tree/master/packages/tools
You can test to confirm that this works be creating a new app with ember new
and then installing @cardstack/tools
and @cardstack/plugin-utils
and running a build. You'll see the styles from the tools plugin in the created vendor.css
.
Please let me know if you have any questions about that or if you'd like to discuss taking a different approach.
Cheers!
from ember-cli-postcss.
@jeffjewiss the thing I was missing was the options
block in the index.js. I didn't even know you could do that! thanks for the example 👍
from ember-cli-postcss.
Okay great, glad to hear you got it sorted!
from ember-cli-postcss.
@jeffjewiss just out of interest... do you think this should be documented anywhere? like a wiki page for "so you're developing an addon and you want to use postcss"?
from ember-cli-postcss.
@mansona yeah, I think that's a great idea. My eventual goal is to have a GitHub pages website with instructions for the different use cases of postcss + ember, but I haven't had time to build it just yet. As a first step I added a section to the bottom of the readme: https://github.com/jeffjewiss/ember-cli-postcss#developing-addons with the example from this issue. Do you think this provides enough guidance until more in-depth documentation is ready?
Cheers
from ember-cli-postcss.
that's perfect, my main issue was not even knowing where to start 😖 thanks a million
from ember-cli-postcss.
Related Issues (20)
- Embroider and postcss-import can't find file in node_modules? HOT 1
- Does not work with postcss 8 HOT 4
- apps, addons, and tailwind specificity HOT 3
- Infinite loop with postcss-color-hex-alpha HOT 2
- Embroider compatibility issue (filter) HOT 2
- Cannot use SCSS in version 7 HOT 10
- How do you run css compilation when templates are updated? HOT 23
- Ember canary error - Uncaught ReferenceError: Ember is not defined HOT 3
- Vulnerability in merge package before 2.1.1 HOT 1
- Deprecation warnings with Ember 3.27 HOT 14
- Addon using @tailwindcss/jit: ENOENT: no such file or directory, stat 'assets/vendor.css' HOT 1
- `yarn outdated` is Confusing HOT 2
- Cannot use `cssnano` in version 7 HOT 6
- ember-cli-postcss v7.1.0 has a breaking change as it's requires Node.js 14 now HOT 5
- ChainAlert: npm package release (7.2.0) has no matching tag in this repo
- Node 12 dropped too early? HOT 1
- Filter deprecation warnings HOT 1
- How do I add postcss-nested to configuration? HOT 1
- [Bug]: Conflicting with ember-cli-sass HOT 2
- how to apply a specific postcss plugin to only a specific set of files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-postcss.