Skip to content

Commit

Permalink
Merge d334682 into fec1dac
Browse files Browse the repository at this point in the history
  • Loading branch information
chawyehsu committed Jan 31, 2019
2 parents fec1dac + d334682 commit b69512d
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -4,4 +4,5 @@ tmp/
*.log
.idea/
coverage/
*.lock
package-lock.json
yarn.lock
8 changes: 7 additions & 1 deletion .npmignore
Expand Up @@ -5,4 +5,10 @@ coverage/
.travis.yml
gulpfile.js
.idea/
appveyor.yml
appveyor.yml
.eslintignore
.eslintrc
.npmignore
package-lock.json
yarn.lock
.jscsrc
22 changes: 18 additions & 4 deletions LICENSE
@@ -1,7 +1,21 @@
Copyright (c) 2014 Tommy Chen
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copyright (c) 2014-present, Tommy Chen

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 1 addition & 2 deletions index.js
@@ -1,10 +1,9 @@
/* global hexo */
'use strict';

var assign = require('object-assign');
var pathFn = require('path');

var config = hexo.config.feed = assign({
var config = hexo.config.feed = Object.assignn({
type: 'atom',
limit: 20,
hub: '',
Expand Down
13 changes: 11 additions & 2 deletions package.json
Expand Up @@ -12,7 +12,14 @@
"directories": {
"lib": "./lib"
},
"files": [
"lib/",
"atom.xml",
"index.js",
"rss2.xml"
],
"repository": "hexojs/hexo-generator-feed",
"homepage": "https://hexo.io/",
"keywords": [
"hexo",
"rss",
Expand All @@ -26,8 +33,7 @@
],
"license": "MIT",
"dependencies": {
"nunjucks": "^3.0.0",
"object-assign": "^4.1.1"
"nunjucks": "^3.0.0"
},
"devDependencies": {
"babel-eslint": "^7.2.3",
Expand All @@ -40,5 +46,8 @@
"jscs": "^3.0.7",
"jscs-preset-hexo": "^1.0.1",
"mocha": "^5.2.0"
},
"engines": {
"node": ">=6.9.0"
}
}
7 changes: 3 additions & 4 deletions test/index.js
Expand Up @@ -6,7 +6,6 @@ var nunjucks = require('nunjucks');
var env = new nunjucks.Environment();
var pathFn = require('path');
var fs = require('fs');
var assign = require('object-assign');
var cheerio = require('cheerio');

env.addFilter('uriencode', function(str) {
Expand Down Expand Up @@ -56,7 +55,7 @@ describe('Feed generator', function() {
path: 'atom.xml',
limit: 3
};
hexo.config = assign(hexo.config, urlConfig);
hexo.config = Object.assign(hexo.config, urlConfig);
var result = generator(locals);

result.path.should.eql('atom.xml');
Expand All @@ -74,7 +73,7 @@ describe('Feed generator', function() {
path: 'rss2.xml',
limit: 3
};
hexo.config = assign(hexo.config, urlConfig);
hexo.config = Object.assign(hexo.config, urlConfig);
var result = generator(locals);

result.path.should.eql('rss2.xml');
Expand All @@ -92,7 +91,7 @@ describe('Feed generator', function() {
path: 'atom.xml',
limit: 0
};
hexo.config = assign(hexo.config, urlConfig);
hexo.config = Object.assign(hexo.config, urlConfig);

var result = generator(locals);

Expand Down

0 comments on commit b69512d

Please sign in to comment.