Skip to content

Commit

Permalink
Merge pull request #16 from segayuu/support-version-active-lts-or-latest
Browse files Browse the repository at this point in the history
Support version active lts or latest
  • Loading branch information
segayuu committed Nov 26, 2018
2 parents 4010b6b + 3848e2c commit 74404b8
Show file tree
Hide file tree
Showing 5 changed files with 3,075 additions and 24 deletions.
4 changes: 0 additions & 4 deletions .jscsrc

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -9,11 +9,11 @@ cache:

node_js:
- "6"
- "node"
- "8"
- "10"

script:
- npm run eslint
- npm run jscs
- npm run test-cov

after_script:
Expand Down
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -5,7 +5,6 @@
"main": "index",
"scripts": {
"eslint": "eslint .",
"jscs": "jscs .",
"test": "mocha test/index.js",
"test-cov": "istanbul cover --print both _mocha -- test/index.js"
},
Expand All @@ -23,15 +22,16 @@
"license": "MIT",
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^2.13.1",
"eslint-config-hexo": "^1.0.2",
"eslint": "^5.9.0",
"eslint-config-hexo": "^3.0.0",
"hexo": "^3.1.1",
"istanbul": "^0.4.1",
"jscs": "^3.0.7",
"jscs-preset-hexo": "^1.0.1",
"mocha": "^5.2.0"
},
"dependencies": {
"hexo-pagination": "0.1.0"
},
"engines": {
"node": "^6.9 || ^8.9 || ^10.13 || >=11"
}
}
}
23 changes: 11 additions & 12 deletions test/index.js
Expand Up @@ -7,20 +7,19 @@ describe('Archive generator', function() {
var hexo = new Hexo(__dirname, {silent: true});
var Post = hexo.model('Post');
var generator = require('../lib/generator').bind(hexo);
var posts;
var locals;
var posts, locals;

before(() => hexo.init().then(() => Post.insert([
{source: 'quux', slug: 'quux', date: new Date(2014, 1, 2)},
{source: 'qux', slug: 'qux', date: new Date(2014, 1, 2)},
{source: 'foo', slug: 'foo', date: new Date(2014, 1, 2)},
{source: 'bar', slug: 'bar', date: new Date(2013, 5, 6)},
{source: 'baz', slug: 'baz', date: new Date(2013, 9, 10)},
{source: 'boo', slug: 'boo', date: new Date(2013, 5, 8)}
])).then(data => {
posts = Post.sort('-date');
locals = hexo.locals.toObject();
}));
{source: 'quux', slug: 'quux', date: new Date(2014, 1, 2)},
{source: 'qux', slug: 'qux', date: new Date(2014, 1, 2)},
{source: 'foo', slug: 'foo', date: new Date(2014, 1, 2)},
{source: 'bar', slug: 'bar', date: new Date(2013, 5, 6)},
{source: 'baz', slug: 'baz', date: new Date(2013, 9, 10)},
{source: 'boo', slug: 'boo', date: new Date(2013, 5, 8)}
])).then(data => {
posts = Post.sort('-date');
locals = hexo.locals.toObject();
}));

it('pagination enabled', function() {
hexo.config.archive_generator = {
Expand Down

0 comments on commit 74404b8

Please sign in to comment.