Skip to content

Commit c0dbbf2

Browse files
Ben SolumBen Solum
Ben Solum
authored and
Ben Solum
committed
Added SweatMap to localIdent
1 parent 253e3a9 commit c0dbbf2

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/getLocalIdent.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55
var loaderUtils = require("loader-utils");
66
var path = require("path");
7+
var myMap = require("SweatMap")({cssSafe: true});
78

89
module.exports = function getLocalIdent(loaderContext, localIdentName, localName, options) {
910
if(!options.context)
@@ -15,6 +16,8 @@ module.exports = function getLocalIdent(loaderContext, localIdentName, localName
1516

1617
return hash.split(/\[sweatcss\]/gi).map(function(H, i) {
1718
H = H.replace(new RegExp("[^a-zA-Z0-9\\-_\u00A0-\uFFFF]", "g"), "-").replace(/^([^a-zA-Z_])/, "_$1");
19+
20+
console.log(H, i, 'hey', myMap.set(H));
1821

1922
if(i % 2 == 1)
2023
H = 'SWEATCSS' + H;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"coveralls": "^2.11.2",
2222
"istanbul": "^0.3.13",
2323
"mocha": "^2.2.4",
24-
"should": "^7.0.1"
24+
"should": "^7.0.1",
25+
"SweatMap": "git://github.com/soluml/SweatMap.git#master"
2526
},
2627
"scripts": {
2728
"test": "mocha",

0 commit comments

Comments
 (0)