DartSass (dart_sass v0.2.0) View Source

DartSass is a installer and runner for sass.

Profiles

You can define multiple dart_sass profiles. By default, there is a profile called :default which you can configure its args, current directory and environment:

config :dart_sass,
  version: "1.39.0",
  default: [
    args: ~w(css/app.scss ../priv/static/assets/app.css),
    cd: Path.expand("../assets", __DIR__)
  ]

Link to this section Summary

Functions

Returns the path to the executable and optional snapshot.

Returns the version of the dart_sass executable.

Returns the configuration for the given profile.

Returns the configured dart-sass version.

Installs dart-sass with configured_version/0.

Installs, if not available, and then runs sass.

Checks whether or not dart-sass is installed.

Runs the given command with args.

Link to this section Functions

Returns the path to the executable and optional snapshot.

Depending on your environment, sass may be invoked through a portable instance of the Dart VM. In such case, this function will return a tuple of {Dart, Snapshot}, otherwise it will return {Sass, Nil}.

Returns the version of the dart_sass executable.

Returns {:ok, version_string} on success or :error when the executable is not available.

Returns the configuration for the given profile.

Returns nil if the profile does not exist.

Returns the configured dart-sass version.

Installs dart-sass with configured_version/0.

Link to this function

install_and_run(profile, args)

View Source

Installs, if not available, and then runs sass.

Returns the same as run/2.

Checks whether or not dart-sass is installed.

Link to this function

run(profile, extra_args)

View Source

Runs the given command with args.

The given args will be appended to the configured args. The task output will be streamed directly to stdio. It returns the status of the underlying call.