Changelog
8.0.0 (02/23/24)
sass
option (string
or Sass implementation instance,
defaults to 'sass'
) to allow using either sass
or embedded-sass
.importers
option by default, if Dart Sass v1.71 or later is
available. Users can opt out by providing their own importers
option, e.g.
{ importers: [] }
.sass
as a peer-dependency.Changelog
7.0.1 (01/04/24)
runSass
arguments and warn if using v6 API.{ style: 'compressed' }
is not supported.Changelog
7.0.0 (12/14/22)
contains()
checks multiple block with matching selectors.
#243sourceType
option (path
[default] or string
)runSass
: 1) True options, 2) source
path (or string), 3) optional Sass optionsincludePaths
is now loadPaths
, outputStyle
is now style
, importer
is now importers
, etc. See the Dart Sass
documentation
for more details.sass
(>=1.45.0
) as a peer-dependency, removing True
sass
optionrunSass
arguments have changed:v6:
const path = require('path');
const sass = require('node-sass');
const sassTrue = require('sass-true');
const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
// Sass options [required]
{ file: sassFile, includePaths: ['node_modules'] },
// True options [required]
{ describe, it, sass },
);
const sassString = `
h1 {
font-size: 40px;
}`;
sassTrue.runSass(
// Sass options [required]
{
data: sassString,
includePaths: ['node_modules'],
},
// True options [required]
{ describe, it, sass },
);
v7:
const path = require('path');
const sassTrue = require('sass-true');
const sassFile = path.join(__dirname, 'test.scss');
sassTrue.runSass(
// True options [required]
{ describe, it },
// Sass source (path) [required]
sassFile,
// Sass options [optional]
{ loadPaths: ['node_modules'] },
);
const sassString = `
h1 {
font-size: 40px;
}`;
sassTrue.runSass(
// True options [required]
{ describe, it, sourceType: 'string' },
// Sass source (string) [required]
sassString,
// Sass options [optional]
{ loadPaths: ['node_modules'] },
);
Changelog
7.0.0-beta.0 (09/16/22)
sourceType
option (path
[default] or string
)runSass
: 1) True options, 2) source
path (or string), 3) optional Sass optionssass
as a peer-dependency, removing True sass
optionChangelog
6.1.0-beta.1 (02/24/22)
Changelog
6.0.1 (10/16/20)
Changelog
6.0.0 (07/22/20)
$true-terminal-output
setting to $terminal-output
when importing as a module (with @use
).
Projects not using Sass modules can still
@import '<path>/sass-true/sass/true'
and access the setting as $true-terminal-output
_index.scss
at the project root,
for simpler import path: @use '<path>/sass-true'
sass/_throw.scss
module provides:
error()
function & mixin for establishing "catchable" errors$catch-errors
toggles how error()
output is handledcontent
properties which include a curly brace.Changelog
5.0.0 (06/03/19)
runSass
, which now accepts two arguments: a
sassOptions
object and a trueOptions
object.sass
option to runSass
for passing a different Sass implementation
than node-sass
#137node-sass
from peerDependencies
assert.fail
#138