grind sasstask instead
1. Install Sass and add it to your path.
2. Add the following lines to your
dependencies: sass_transformer: any transformers: - sass_transformer
After adding the transformer, all your
.scss files that don't begin with
_ will be automatically transformed to
If your main file imports other files outside the main files folder, you need to add the option
sass know which folder will be used for processing outside imports:
dependencies: sass_transformer: any transformers: - sass_transformer: include_paths: path/to/folder/with/other/scss
you can have multiple
dependencies: sass_transformer: any transformers: - sass_transformer: include_paths: - path/to/folder/with/other/scss1 - path/to/folder/with/other/scss2
pub serveduring development, css files are going to live in memory only. Executing
pub buildcreates actual css files in build folder
3. Finally in the html files you only need to import the generated css files:
<!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href="path/to/main.css"> </head> <body> <!-- content goes hear --> </body> </html>
You can also pass options to Sass if necessary:
transformers: - sass_transformer: executable: /path/to/sass # Sass executable to use compass: true # Include compass line_numbers: true # Include line numbers in output style: compact # Style of generated CSS copy_sources: true # Copy original .scss/.sass files to output directory
You can use SassC instead of normal Sass by specifying executable as 'sassc' (or any path ending with 'sassc'):
transformers: - sass_transformer: executable: sassc # or /path/to/sassc
SassC only supports
.scss-files and does not support Compass.
libpath replacement. If primary asset path was
lib/without sub folder was not processed correctly.
Add this to your package's pubspec.yaml file:
dependencies: sass_transformer: ^0.1.2+1
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:sass_transformer/sass.dart'; import 'package:sass_transformer/transformer.dart';
|0.1.2+1||Dec 2, 2016|
|0.1.2||Sep 1, 2016|
|0.1.1||Aug 27, 2016|
|0.1.0+1||Aug 26, 2016|
|0.1.0||Aug 26, 2016|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in
The SDK constraint in
pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.
dartdoc failed. (-10 points)
dartdoc runs without any issues.
|Dart SDK||>=1.12.0 <2.0.0|