Skip to content

Commit

Permalink
1. 修复超大模板编译性能问题 [#539](https://github.com/aui/art-template/issues/539…
Browse files Browse the repository at this point in the history
  • Loading branch information
aui committed Aug 21, 2018
2 parents c74685e + 7463d53 commit 71e46f7
Show file tree
Hide file tree
Showing 25 changed files with 7,162 additions and 453 deletions.
9 changes: 9 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"presets": [
["env", {
"targets": {
"browsers": ["Explorer >= 7"]
}
}]
]
}
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## v4.13.0

1. 修复超大模板编译性能问题 [#539](https://github.com/aui/art-template/issues/539)[#4](https://github.com/aui/express-art-template/issues/4)
2. 支持嵌套 block [#468](https://github.com/aui/art-template/issues/468)

## v4.12.2

1. 修复 [#483](https://github.com/aui/art-template/issues/483)
Expand Down
4 changes: 3 additions & 1 deletion lib/compile/adapter/html-minifier.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

var detectNode = require('detect-node');

/**
Expand All @@ -17,7 +19,7 @@ var htmlMinifier = function htmlMinifier(source, options) {
var ignoreCustomFragments = options.rules.map(function (rule) {
return rule.test;
});
(_htmlMinifierOptions$ = htmlMinifierOptions.ignoreCustomFragments).push.apply(_htmlMinifierOptions$, ignoreCustomFragments);
(_htmlMinifierOptions$ = htmlMinifierOptions.ignoreCustomFragments).push.apply(_htmlMinifierOptions$, _toConsumableArray(ignoreCustomFragments));
source = _htmlMinifier(source, htmlMinifierOptions);
}

Expand Down
Loading

0 comments on commit 71e46f7

Please sign in to comment.