Git Product home page Git Product logo

Comments (2)

i-n-g-m-a-r avatar i-n-g-m-a-r commented on August 15, 2024

To assist anyone searching for phoenix dart_sass multiple profiles here's how it's done.

  1. Create a .scss file

./assets/css/foobar.scss

  1. Add profile in config.exs
config :dart_sass,
  version: "1.49.11",
  default: [
    args: ~w(css/main.scss ../priv/static/assets/main.css),
    cd: Path.expand("../assets", __DIR__)
  ],
  foobar: [
    args: ~w(css/foobar.scss ../priv/static/assets/foobar.css),
    cd: Path.expand("../assets", __DIR__)
  ]
  1. Add profile in dev.exs
watchers: [
  # Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
  esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
  sass: {DartSass, :install_and_run, [:default, ~w(--embed-source-map --source-map-urls=absolute --watch)]},
  sass: {DartSass, :install_and_run, [:foobar, ~w(--embed-source-map --source-map-urls=absolute --watch)]},
]

Done.

from dart_sass.

mcrumm avatar mcrumm commented on August 15, 2024

Closing this, but if you think the README/docs could be clearer or need more examples, a PR would definitely be welcome! :)

from dart_sass.

Related Issues (19)

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.