Clean package.json and .eslintrc
This commit is contained in:
Родитель
c38a2e6320
Коммит
269787245b
|
@ -0,0 +1 @@
|
|||
coverage
|
|
@ -53,15 +53,15 @@
|
|||
"no-invalid-this": 0,
|
||||
"no-magic-numbers": 0,
|
||||
"no-negated-condition": 0,
|
||||
"no-shadow": 0, // TODO: Change to `1`?
|
||||
"no-shadow": 1,
|
||||
"no-trailing-spaces": [2, {"skipBlankLines": false}],
|
||||
"no-undef": 2,
|
||||
"no-underscore-dangle": 0,
|
||||
"no-unused-vars": [2, {"vars": "all", "args": "none"}],
|
||||
"no-warning-comments": 0, // TODO: Change to `1`?
|
||||
"object-curly-spacing": [2, "never"],
|
||||
"no-var": 2,
|
||||
"prefer-const": 0, // TODO: Change to `1`?
|
||||
"no-warning-comments": 1,
|
||||
"object-curly-spacing": [2, "never"],
|
||||
"prefer-const": 1,
|
||||
"prefer-reflect": 0,
|
||||
"quotes": [2, "single", "avoid-escape"],
|
||||
"semi": [2, "always"],
|
||||
|
|
|
@ -3,13 +3,13 @@ machine:
|
|||
COVERALLS_REPO_TOKEN: Vf8OYui1kwrD3HoOBefD4K0sbgpOVz7JO
|
||||
|
||||
node:
|
||||
version: 6.2
|
||||
version: 6.2
|
||||
|
||||
dependencies:
|
||||
override:
|
||||
- npm install --only=dev
|
||||
- npm update
|
||||
- sudo apt-get update && sudo apt-get install libpango1.0-0 && sudo apt-get install libpangocairo-1.0-0 && sudo apt-get install firefox
|
||||
- sudo apt-get update && sudo apt-get install libpango1.0-0 libpangocairo-1.0-0 firefox
|
||||
|
||||
test:
|
||||
post:
|
||||
|
|
|
@ -25,7 +25,7 @@ module.exports = function(config) {
|
|||
postLoaders: [{
|
||||
test: /\.js$/,
|
||||
loader: 'istanbul-instrumenter',
|
||||
include: [path.join(__dirname, '/parser.js')]
|
||||
include: [path.join(__dirname, 'parser.js')]
|
||||
}]
|
||||
},
|
||||
externals: {
|
||||
|
|
46
package.json
46
package.json
|
@ -1,45 +1,25 @@
|
|||
{
|
||||
"name": "page-metadata-parser",
|
||||
"description": "A JavaScript library for parsing metadata in a Web Page.",
|
||||
"version": "0.2.0",
|
||||
"description": "A Javascript library for parsing metadata in a Web Page.",
|
||||
"main": "parser.js",
|
||||
"scripts": {
|
||||
"test:lint": "eslint ./*.js ./tests/*.js",
|
||||
"test:karma": "karma start",
|
||||
"test:mocha": "./node_modules/istanbul/lib/cli.js cover _mocha --report lcovonly -- tests/*.test.js -R spec",
|
||||
"test": "npm-run-all test:*",
|
||||
"tdd": "npm run test:karma -- --no-single-run",
|
||||
"cover": "cat ./coverage/lcov/lcov.info | coveralls"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mozilla/page-metadata-parser.git"
|
||||
},
|
||||
"keywords": [
|
||||
"page",
|
||||
"metadata",
|
||||
"parser"
|
||||
],
|
||||
"author": "Jared Kerim",
|
||||
"license": "MPL-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/mozilla/page-metadata-parser/issues"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/page-metadata-parser#readme",
|
||||
"dependencies": {
|
||||
"fathom-web": "^1.1.0",
|
||||
"karma-chrome-launcher": "^1.0.1",
|
||||
"wu": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^3.5.0",
|
||||
"coveralls": "^2.11.9",
|
||||
"eslint": "^2.13.1",
|
||||
"eslint-plugin-mozilla": "0.0.3",
|
||||
"eslint-plugin-mozilla": "^0.0.3",
|
||||
"istanbul": "^0.4.4",
|
||||
"istanbul-instrumenter-loader": "^0.2.0",
|
||||
"jsdom": "^9.2.1",
|
||||
"karma": "^1.0.0",
|
||||
"karma-chrome-launcher": "^1.0.1",
|
||||
"karma-coverage": "^1.0.0",
|
||||
"karma-firefox-launcher": "^1.0.0",
|
||||
"karma-mocha": "^1.0.1",
|
||||
|
@ -49,5 +29,25 @@
|
|||
"mocha": "^2.5.3",
|
||||
"npm-run-all": "^2.2.0",
|
||||
"webpack": "^1.13.1"
|
||||
},
|
||||
"homepage": "https://github.com/mozilla/page-metadata-parser#readme",
|
||||
"keywords": [
|
||||
"page",
|
||||
"metadata",
|
||||
"parser"
|
||||
],
|
||||
"license": "MPL-2.0",
|
||||
"main": "parser.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/mozilla/page-metadata-parser.git"
|
||||
},
|
||||
"scripts": {
|
||||
"cover": "cat ./coverage/lcov/lcov.info | coveralls",
|
||||
"tdd": "npm run test:karma -- --no-single-run",
|
||||
"test": "npm-run-all test:*",
|
||||
"test:karma": "karma start",
|
||||
"test:lint": "eslint .",
|
||||
"test:mocha": "istanbul cover _mocha --report lcovonly -- tests/*.test.js -R spec"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ const metadataRules = {
|
|||
|
||||
|
||||
function getMetadata(doc) {
|
||||
let metadata = {};
|
||||
const metadata = {};
|
||||
|
||||
Object.keys(metadataRules).map(metadataKey => {
|
||||
const metadataRule = metadataRules[metadataKey];
|
||||
|
@ -87,6 +87,6 @@ function getMetadata(doc) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
metadataRules: metadataRules,
|
||||
getMetadata: getMetadata
|
||||
metadataRules,
|
||||
getMetadata
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Tests for parse.js
|
||||
const {assert} = require('chai');
|
||||
const {getMetadata} = require('../parser.js');
|
||||
const {getMetadata} = require('../parser');
|
||||
const {stringToDom} = require('./test-utils');
|
||||
|
||||
describe('Get Metadata Tests', function() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Tests for parse.js
|
||||
const {assert} = require('chai');
|
||||
const {metadataRules} = require('../parser.js');
|
||||
const {metadataRules} = require('../parser');
|
||||
const {stringToDom} = require('./test-utils');
|
||||
|
||||
function buildHTML(tag) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче