UNPKG
postcss-js
Version:
latest (5.0.0)
5.0.0
4.1.0
4.0.1
4.0.0
3.0.3
3.0.2
3.0.1
3.0.0
2.0.3
2.0.2
2.0.1
2.0.0
1.0.1
1.0.0
0.3.0
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
PostCSS for CSS-in-JS and styles in JS objects
github.com/postcss/postcss-js
postcss/postcss-js
postcss-js
/
process-result.js
12 lines
(10 loc)
•
300 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
let
objectify =
require
(
'./objectifier'
)
module
.
exports
=
function
processResult
(
result
) {
if
(
console
&&
console
.
warn
) { result.
warnings
().
forEach
(
warn
=>
{
let
source = warn.
plugin
||
'PostCSS'
console
.
warn
(source +
': '
+ warn.
text
) }) }
return
objectify
(result.
root
) }