Giter Club home page Giter Club logo

Comments (6)

jeffjewiss avatar jeffjewiss commented on May 30, 2024

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.

mansona avatar mansona commented on May 30, 2024

@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.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

Okay great, glad to hear you got it sorted!

from ember-cli-postcss.

mansona avatar mansona commented on May 30, 2024

@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.

jeffjewiss avatar jeffjewiss commented on May 30, 2024

@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.

mansona avatar mansona commented on May 30, 2024

that's perfect, my main issue was not even knowing where to start 😖 thanks a million

from ember-cli-postcss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.