rollup-plugin-postcss
Advanced tools
Comparing version 0.0.22 to 0.0.23
17
index.js
@@ -36,8 +36,13 @@ 'use strict'; | ||
}; | ||
code = postcss(options.plugins || []).process(code, opts).css; | ||
code = 'export default ' + injectFnName + '(' + JSON.stringify(code) + ');'; | ||
return { | ||
code: code, | ||
map: { mappings: '' } | ||
}; | ||
return new Promise(function (resolve, reject) { | ||
postcss(options.plugins || []).process(code, opts).then(function (result) { | ||
result.css = 'export default ' + injectFnName + '(' + JSON.stringify(result.css) + ');'; | ||
resolve({ | ||
code: result.css, | ||
map: result.map | ||
}); | ||
})['catch'](function (err) { | ||
return reject(err); | ||
}); | ||
}); | ||
} | ||
@@ -44,0 +49,0 @@ }; |
{ | ||
"name": "rollup-plugin-postcss", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "Seamless integration between Rollup and PostCSS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -29,10 +29,16 @@ import { createFilter } from 'rollup-pluginutils'; | ||
}; | ||
code = postcss(options.plugins || []).process(code, opts).css; | ||
code = `export default ${injectFnName}(${JSON.stringify(code)});` | ||
return { | ||
code, | ||
map: { mappings: '' } | ||
}; | ||
return new Promise((resolve, reject) => { | ||
postcss(options.plugins || []) | ||
.process(code, opts) | ||
.then(result => { | ||
result.css = `export default ${injectFnName}(${JSON.stringify(result.css)});` | ||
resolve({ | ||
code: result.css, | ||
map: result.map | ||
}); | ||
}) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
}; | ||
}; |
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
6302
98