postcss-elm-tailwind
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -49,2 +49,4 @@ function elmHeader(elmModuleName, elm_fns) { | ||
cls = cls.replace(/^(\.)/, ""); | ||
// make other dots safe | ||
cls = cls.replace(/\\\./g, "."); | ||
// remove extras at end | ||
@@ -96,4 +98,10 @@ cls = cls.replace( | ||
elm = elm.replace(/_(last|first)_child/, ""); | ||
// replace any other dots | ||
if (opts.nameStyle === "camel") { | ||
elm = elm.replace(/\./g, "Dot"); | ||
} else { | ||
elm = elm.replace(/\./g, "_dot_"); | ||
} | ||
// convert to camel case | ||
if (opts.nameStyle === "camel") { | ||
elm = elm.replace(/(_+\w)/g, g => g.replace(/_/g, "").toUpperCase()); | ||
@@ -100,0 +108,0 @@ } |
{ | ||
"name": "postcss-elm-tailwind", | ||
"main": "./index.js", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "PostCSS plugin Tailwind classes for Elm", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -71,2 +71,6 @@ const h = require("../helpers"); | ||
}); | ||
// regession tests for github issue #13 | ||
it("handle '.' in class names", () => { | ||
assert.equal(h.fixClass(".col-gap-1\\.5"), "col-gap-1.5"); | ||
}); | ||
}); | ||
@@ -163,2 +167,6 @@ | ||
}); | ||
// regession tests for github issue #13 | ||
it("handle '.' in class names", () => { | ||
assert.equal(h.toElmName(h.fixClass(".col-gap-1\\.5")), "col_gap_1_dot_5"); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14766
326