Advanced Semantic Versioning Support
Need to compare version numbers such as 3.2.1-beta.5
and 1.2.3-alpha.2
?
By default, sass-deprecate only compares $version
with $app-version
in the form of Major.Minor.Patch
(e.g. 1.2.3
with 2.0.0
).
For advanced SemVer support in the form of Major.Minor.Patch-beta/alpha/rc.1
, define a deprecate-version-greater-than($v1, $v2)
function, or rely on Hugo's sass-semver:
// Override the default SemVer resolution engine
// with sass-semver: https://github.com/HugoGiraudel/sass-semver
@import 'node_modules/sass-semver/index';
@function deprecate-version-greater-than($version, $app-version) {
@return gt($v1: $version, $v2: $app-version);
}
@import 'path-to/sass-deprecate/index';