Comparing version 0.1.3 to 0.1.4
@@ -47,2 +47,71 @@ // Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | ||
})); | ||
Jest.test("nesting", (function () { | ||
return Jest.Expect[/* toMatchSnapshot */16](Jest.Expect[/* expect */0](/* tuple */[ | ||
Nice.css(/* :: */[ | ||
/* Display */Block.__(0, [/* Flex */5]), | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Red */119]), | ||
/* :: */[ | ||
/* MediaQuery */Block.__(82, [ | ||
"screen", | ||
/* :: */[ | ||
/* Display */Block.__(0, [/* Block */1]), | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Green */54]), | ||
/* :: */[ | ||
/* Select */Block.__(84, [ | ||
":hover", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Orange */104]), | ||
/* :: */[ | ||
/* FontWeight */Block.__(67, [/* Bold */1]), | ||
/* :: */[ | ||
/* Overflow */Block.__(37, [/* Hidden */1]), | ||
/* :: */[ | ||
/* Supports */Block.__(83, [ | ||
"(display: flex)", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Blue */10]), | ||
/* [] */0 | ||
] | ||
]), | ||
/* :: */[ | ||
/* Select */Block.__(84, [ | ||
":active", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Red */119]), | ||
/* :: */[ | ||
/* Display */Block.__(0, [/* Block */1]), | ||
/* :: */[ | ||
/* Select */Block.__(84, [ | ||
".ie6 &", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Blue */10]), | ||
/* [] */0 | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
] | ||
] | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
]), | ||
serialized_rule_cache(/* () */0) | ||
])); | ||
})); | ||
return Jest.test("global", (function () { | ||
@@ -49,0 +118,0 @@ Nice.$$global("html, body", /* :: */[ |
@@ -7,3 +7,3 @@ // Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | ||
var className = Nice.css(/* :: */[ | ||
var cls1 = Nice.css(/* :: */[ | ||
/* Display */Block.__(0, [/* Flex */5]), | ||
@@ -73,8 +73,19 @@ /* :: */[ | ||
console.log(className); | ||
var cls2 = Nice.css(/* :: */[ | ||
/* Width */Block.__(1, [/* Em */Block.__(1, [4.4])]), | ||
/* [] */0 | ||
]); | ||
Nice.$$global("html, body", /* :: */[ | ||
/* Color */Block.__(63, [/* Red */119]), | ||
/* [] */0 | ||
]); | ||
console.log(cls1); | ||
export { | ||
className , | ||
cls1 , | ||
cls2 , | ||
} | ||
/* className Not a pure module */ | ||
/* cls1 Not a pure module */ |
@@ -1258,13 +1258,38 @@ // Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | ||
function rehydrate() { | ||
return /* () */0; | ||
} | ||
var extractIDs = ( | ||
function (html){ | ||
let regex = /css\-([a-zA-Z0-9\-_]+)/gm | ||
let match, ids = new Set(); | ||
while((match = regex.exec(html)) !== null) { | ||
ids.add("." + match[0]); | ||
} | ||
return Array.from(ids.values()); | ||
} | ||
); | ||
function extract() { | ||
function extract(_html) { | ||
var ids = Curry._1(extractIDs, _html); | ||
var css = [/* [] */0]; | ||
$$Array.iter((function (id) { | ||
css[0] = List.concat(/* :: */[ | ||
Hashtbl.find(rule_cache, id), | ||
/* :: */[ | ||
css[0], | ||
/* [] */0 | ||
] | ||
]); | ||
return /* () */0; | ||
}), ids); | ||
return /* record */[ | ||
/* css : [] */0, | ||
/* ids : [] */0 | ||
/* css */css[0], | ||
/* ids */ids | ||
]; | ||
} | ||
function rehydrate(ids) { | ||
return $$Array.iter((function (id) { | ||
return Hashtbl.add(injected_cache, id, /* true */1); | ||
}), ids); | ||
} | ||
var Presets = /* module */[ | ||
@@ -1330,4 +1355,5 @@ /* mobile */"(min-width:400px)", | ||
fontFace , | ||
extractIDs , | ||
extract , | ||
rehydrate , | ||
extract , | ||
Presets , | ||
@@ -1334,0 +1360,0 @@ |
@@ -47,2 +47,71 @@ // Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | ||
})); | ||
Jest.test("nesting", (function () { | ||
return Jest.Expect[/* toMatchSnapshot */16](Jest.Expect[/* expect */0](/* tuple */[ | ||
Nice.css(/* :: */[ | ||
/* Display */Block.__(0, [/* Flex */5]), | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Red */119]), | ||
/* :: */[ | ||
/* MediaQuery */Block.__(82, [ | ||
"screen", | ||
/* :: */[ | ||
/* Display */Block.__(0, [/* Block */1]), | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Green */54]), | ||
/* :: */[ | ||
/* Select */Block.__(84, [ | ||
":hover", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Orange */104]), | ||
/* :: */[ | ||
/* FontWeight */Block.__(67, [/* Bold */1]), | ||
/* :: */[ | ||
/* Overflow */Block.__(37, [/* Hidden */1]), | ||
/* :: */[ | ||
/* Supports */Block.__(83, [ | ||
"(display: flex)", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Blue */10]), | ||
/* [] */0 | ||
] | ||
]), | ||
/* :: */[ | ||
/* Select */Block.__(84, [ | ||
":active", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Red */119]), | ||
/* :: */[ | ||
/* Display */Block.__(0, [/* Block */1]), | ||
/* :: */[ | ||
/* Select */Block.__(84, [ | ||
".ie6 &", | ||
/* :: */[ | ||
/* Color */Block.__(63, [/* Blue */10]), | ||
/* [] */0 | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
] | ||
] | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
] | ||
]), | ||
/* [] */0 | ||
] | ||
] | ||
]), | ||
serialized_rule_cache(/* () */0) | ||
])); | ||
})); | ||
return Jest.test("global", (function () { | ||
@@ -49,0 +118,0 @@ Nice.$$global("html, body", /* :: */[ |
@@ -7,3 +7,3 @@ // Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | ||
var className = Nice.css(/* :: */[ | ||
var cls1 = Nice.css(/* :: */[ | ||
/* Display */Block.__(0, [/* Flex */5]), | ||
@@ -73,5 +73,16 @@ /* :: */[ | ||
console.log(className); | ||
var cls2 = Nice.css(/* :: */[ | ||
/* Width */Block.__(1, [/* Em */Block.__(1, [4.4])]), | ||
/* [] */0 | ||
]); | ||
exports.className = className; | ||
/* className Not a pure module */ | ||
Nice.$$global("html, body", /* :: */[ | ||
/* Color */Block.__(63, [/* Red */119]), | ||
/* [] */0 | ||
]); | ||
console.log(cls1); | ||
exports.cls1 = cls1; | ||
exports.cls2 = cls2; | ||
/* cls1 Not a pure module */ |
@@ -1258,13 +1258,38 @@ // Generated by BUCKLESCRIPT VERSION 2.1.0, PLEASE EDIT WITH CARE | ||
function rehydrate() { | ||
return /* () */0; | ||
} | ||
var extractIDs = ( | ||
function (html){ | ||
let regex = /css\-([a-zA-Z0-9\-_]+)/gm | ||
let match, ids = new Set(); | ||
while((match = regex.exec(html)) !== null) { | ||
ids.add("." + match[0]); | ||
} | ||
return Array.from(ids.values()); | ||
} | ||
); | ||
function extract() { | ||
function extract(_html) { | ||
var ids = Curry._1(extractIDs, _html); | ||
var css = [/* [] */0]; | ||
$$Array.iter((function (id) { | ||
css[0] = List.concat(/* :: */[ | ||
Hashtbl.find(rule_cache, id), | ||
/* :: */[ | ||
css[0], | ||
/* [] */0 | ||
] | ||
]); | ||
return /* () */0; | ||
}), ids); | ||
return /* record */[ | ||
/* css : [] */0, | ||
/* ids : [] */0 | ||
/* css */css[0], | ||
/* ids */ids | ||
]; | ||
} | ||
function rehydrate(ids) { | ||
return $$Array.iter((function (id) { | ||
return Hashtbl.add(injected_cache, id, /* true */1); | ||
}), ids); | ||
} | ||
var Presets = /* module */[ | ||
@@ -1329,5 +1354,6 @@ /* mobile */"(min-width:400px)", | ||
exports.fontFace = fontFace; | ||
exports.extractIDs = extractIDs; | ||
exports.extract = extract; | ||
exports.rehydrate = rehydrate; | ||
exports.extract = extract; | ||
exports.Presets = Presets; | ||
/* match Not a pure module */ |
{ | ||
"name": "bs-nice", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "css-in-reason", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -32,3 +32,2 @@ (work in progress) | ||
* ~ hot reloading | ||
* 'server' side | ||
* benchmarks / tests |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
294679
3163
33