Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1003 Bytes

File metadata and controls

42 lines (27 loc) · 1003 Bytes

Before going into details, please read how build is different from transformers.

Setting up your project

Add dependency

dev_dependencies:
  sass_builder:
    git: https://github.com/daniel-v/dart_sass_builder.git

Set up build phase

The convention I follow:

  • have tool folder
  • have a tool\build.dart file that contains all the build phases, Sass compilation is one of them

Specify SASS file locations

In the build file, specify what where you sass files are:

SassBuilder.addPhases(phases, graph, ['lib/**/*.scss']);

Run builder

pub run tool/build.dart && pub serve

You can now open your browser at http://localhost:8080/

Alternatively you can activate it as a global package

pub global activate --source git https://github.com/daniel-v/dart_sass_builder.git

and run sass-builder in the folder where your pubspec.yaml and sass_builder.yaml files are.