MCPcopy Create free account
hub / github.com/ampproject/amphtml / transformCssSync

Function transformCssSync

build-system/tasks/css/jsify-css-sync.js:16–21  ·  view source on GitHub ↗

* Synchronously transforms a css string using postcss. * @param {string} cssStr the css text to transform * @param {!Object=} opt_cssnano cssnano options * @param {!Object=} opt_filename the filename of the file being transformed. Used for sourcemaps generation. * @return {object} The transform

(cssStr, opt_cssnano, opt_filename)

Source from the content-addressed store, hash-verified

14 * @return {object} The transformation result
15 */
16function transformCssSync(cssStr, opt_cssnano, opt_filename) {
17 if (!syncTransformer) {
18 syncTransformer = require('sync-rpc')(__dirname + '/init-sync');
19 }
20 return syncTransformer(cssStr, opt_cssnano, opt_filename);
21}
22
23module.exports = {
24 transformCssSync,

Callers 1

CallExpressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected