hexo-generator-recent
Advanced tools
Comparing version 0.1.0 to 0.1.3
@@ -1,3 +0,4 @@ | ||
var _ = require('underscore') | ||
var util = require('util') | ||
'use strict' | ||
const _ = require('lodash') | ||
const util = require('util') | ||
@@ -35,2 +36,3 @@ //defaults | ||
hexo.extend.generator.register('generatorRecent', function(locals) { | ||
var posts = [] | ||
@@ -46,2 +48,3 @@ var options | ||
} | ||
let space = options.prettyPrint ? ' ' : '' | ||
circular = _.intersection(options.fields, circular) | ||
@@ -76,4 +79,4 @@ | ||
path: options.file, | ||
data: JSON.stringify(posts) | ||
data: JSON.stringify(posts, null, space) | ||
} | ||
}) |
{ | ||
"name": "hexo-generator-recent", | ||
"version": "0.1.0", | ||
"version": "0.1.3", | ||
"description": "Creates a list of recent articles in JSON", | ||
@@ -25,4 +25,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"underscore": "^1.8.3" | ||
"lodash": "^4.11.1" | ||
} | ||
} |
@@ -6,2 +6,6 @@ # hexo-generator-recent | ||
## Unmaintained | ||
Please open an issue if you would like to take ownership. | ||
## Installation | ||
@@ -25,6 +29,6 @@ | ||
```yaml | ||
jsonContent: | ||
file: `recent.json` | ||
generatorRecent: | ||
file: recent.json | ||
number: 5 | ||
sort: `-date` | ||
sort: -date | ||
fields: # set to true for all fields (default) | ||
@@ -31,0 +35,0 @@ - title |
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
3902
71
38
+ Addedlodash@^4.11.1
+ Addedlodash@4.17.21(transitive)
- Removedunderscore@^1.8.3
- Removedunderscore@1.13.7(transitive)