transform_sass 0.3.1

  • README.md
  • Installing
  • Versions
  • 9

Transform Sass

[![Join the chat at https://gitter.im/transform-sass/Lobby](https://badges.gitter.im/transform-sass/Lobby.svg)](https://gitter.im/transform-sass/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Transform Sass is a Dart transformer for pub serve and pub build that uses [Dart-Sass][https://github.com/sass/dart-sass] for compiling scss and sass files into css. Transformer supports 'package:...' imports. This transformer can handle:

  • base_project/

    • pubspec.yaml
    • lib/
      • _base_style.scss
      • more/
        • _more_base_style.scss
        • _even_more_base_style.scss
  • another_project/

    • pubspec.yaml
    • lib/
      • _another_style.scss
  • your_project/

    • pubspec.yaml
    • lib/
      • _your_style.scss
    • web/
      • css/
        • style.scss
        • more/
          • _more_style.scss

Where the contents are as follows:

All pubspec.yaml files.

...
dependencies:
  ...
  transform_sass: '>=0.3.1'

transformers:
  ...
  - transform_sass
...

_base_style.scss

@import 'package:base_project/more/more_base_style';
@import 'more/even_more_base_style';
...

_another_style.scss

@import 'package:base_project/base_style';
...

_your_style.scss

@import 'package:base_project/base_style';
...

style.css

@import 'more/more_style';
@import 'package:your_project/another_style';
@import 'package:base_project/base_style'; // Redundant, but present for example
...

Simply put, all imports work like Dart. To use the transformer, add the following two lines to your pubspec.yaml file:

dependencies:
  transform_sass: '>=0.3.1'
transformers:
  - transform_sass

Afterwards, run pub install. Changes to the CSS in the browser only require refreshing the browser when running pub serve.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  transform_sass: ^0.3.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:transform_sass/transform_sass.dart';
  
Version Uploaded Documentation Archive
0.3.1 Aug 26, 2017 Go to the documentation of transform_sass 0.3.1 Download transform_sass 0.3.1 archive
0.3.0 Aug 5, 2017 Go to the documentation of transform_sass 0.3.0 Download transform_sass 0.3.0 archive
0.2.4 Jun 20, 2017 Go to the documentation of transform_sass 0.2.4 Download transform_sass 0.2.4 archive
0.2.3 Jun 7, 2017 Go to the documentation of transform_sass 0.2.3 Download transform_sass 0.2.3 archive
0.1.0 Apr 2, 2017 Go to the documentation of transform_sass 0.1.0 Download transform_sass 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
17
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
9
Learn more about scoring.

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.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

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.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.22.0 <2.0.0