Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make plugin faster #23

Merged
merged 4 commits into from
May 3, 2019
Merged

Make plugin faster #23

merged 4 commits into from
May 3, 2019

Conversation

stevenjoezhang
Copy link
Contributor

No description provided.

@@ -26,17 +24,17 @@ module.exports.symbolsCount = function(content) {
return symbolsResult;
};

module.exports.symbolsTime = function(content, awl, wpm, suffix) {
module.exports.symbolsTime = function(post, awl, wpm, suffix) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'module' is not defined.

@@ -16,8 +14,8 @@ var getFormatTime = function(minutes, suffix) {
: fHours + ':' + ('00' + fMinutes).slice(-2); // = 61 => 1:01
};

module.exports.symbolsCount = function(content) {
var symbolsResult = getSymbols(content);
module.exports.symbolsCount = function(post) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'module' is not defined.

@@ -20,4 +20,13 @@ if (hexo.config.symbols_count_time) {
hexo.extend.helper.register('symbolsTimeTotal', helper.symbolsTimeTotal);
}

if (hexo.config.symbols_count_time.symbols || hexo.config.symbols_count_time.time || hexo.config.symbols_count_time.total_symbols || hexo.config.symbols_count_time.total_time) {
hexo.extend.filter.register('after_post_render', function(data) {
var util = require('hexo-util');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

@@ -20,4 +20,13 @@ if (hexo.config.symbols_count_time) {
hexo.extend.helper.register('symbolsTimeTotal', helper.symbolsTimeTotal);
}

if (hexo.config.symbols_count_time.symbols || hexo.config.symbols_count_time.time || hexo.config.symbols_count_time.total_symbols || hexo.config.symbols_count_time.total_time) {
hexo.extend.filter.register('after_post_render', function(data) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'hexo' is not defined.

@@ -20,4 +20,13 @@ if (hexo.config.symbols_count_time) {
hexo.extend.helper.register('symbolsTimeTotal', helper.symbolsTimeTotal);
}

if (hexo.config.symbols_count_time.symbols || hexo.config.symbols_count_time.time || hexo.config.symbols_count_time.total_symbols || hexo.config.symbols_count_time.total_time) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'hexo' is not defined.

@theme-next theme-next deleted a comment from houndci-bot May 3, 2019
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 69.811% when pulling 79f3b48 on stevenjoezhang:count into 126276f on theme-next:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 69.811% when pulling 79f3b48 on stevenjoezhang:count into 126276f on theme-next:master.

@coveralls
Copy link

coveralls commented May 3, 2019

Coverage Status

Coverage decreased (-1.1%) to 69.811% when pulling 69cc745 on stevenjoezhang:count into 126276f on theme-next:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 69.811% when pulling 79f3b48 on stevenjoezhang:count into 126276f on theme-next:master.

@ivan-nginx ivan-nginx changed the title Make symbols_count_time faster Make plugin faster May 3, 2019
@ivan-nginx ivan-nginx merged commit 30a7cdc into theme-next:master May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants