flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
30
BACK_BACK/node_modules/parcel-bundler/lib/transforms/htmlnano.js
generated
vendored
Executable file
30
BACK_BACK/node_modules/parcel-bundler/lib/transforms/htmlnano.js
generated
vendored
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
|
||||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
||||
|
||||
const posthtml = require('posthtml');
|
||||
|
||||
const htmlnano = require('htmlnano');
|
||||
|
||||
module.exports = /*#__PURE__*/function () {
|
||||
var _ref = (0, _asyncToGenerator2.default)(function* (asset) {
|
||||
yield asset.parseIfNeeded();
|
||||
let htmlNanoConfig = Object.assign({}, yield asset.getConfig(['.htmlnanorc', '.htmlnanorc.js'], {
|
||||
packageKey: 'htmlnano'
|
||||
}), {
|
||||
minifyCss: false,
|
||||
minifyJs: false
|
||||
});
|
||||
let res = yield posthtml([htmlnano(htmlNanoConfig)]).process(asset.ast, {
|
||||
skipParse: true
|
||||
});
|
||||
asset.ast = res.tree;
|
||||
asset.isAstDirty = true;
|
||||
});
|
||||
|
||||
return function (_x) {
|
||||
return _ref.apply(this, arguments);
|
||||
};
|
||||
}();
|
||||
Loading…
Add table
Add a link
Reference in a new issue