Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kesava authored Jul 5, 2017
2 parents 029f6a8 + c947ede commit 39dc679
Show file tree
Hide file tree
Showing 10 changed files with 2,703 additions and 1,721 deletions.
19 changes: 18 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "nfl",
"extends": ["nfl", "prettier"],
"env": {
"browser": true,
"mocha": true,
Expand All @@ -8,5 +8,22 @@
"globals": {
"expect": false,
"sinon": false
},
"plugins": [
"prettier"
],
"rules": {
"prettier/prettier": ["error", {
"printWidth": 80,
"tabWidth": 4,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": false,
"semi": true,
"useTabs": false,
"parser": "babylon",
"jsxBracketSameLine": false
}
]
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import React from "react";
import {Helmet} from "react-helmet";

class Application extends React.Component {
render () {
return (
<div className="application">
<Helmet>
Expand All @@ -28,6 +29,7 @@ class Application extends React.Component {
...
</div>
);
}
};
```

Expand Down Expand Up @@ -212,6 +214,9 @@ function HTML () {
<link rel="canonical" href="http://mysite.com/example" />
<link rel="apple-touch-icon" href="http://mysite.com/img/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes-"72x72" href="http://mysite.com/img/apple-touch-icon-72x72.png" />
{locales.map((locale) => {
<link rel="alternate" href="http://example.com/{locale}" hrefLang={locale} />
})}

{/* multiple script elements */}
<script src="http://include.com/pathtojs.js" type="text/javascript" />
Expand Down
40 changes: 18 additions & 22 deletions karma.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Karma configuration

module.exports = function (config) {
module.exports = function(config) {
function normalizationBrowserName(browser) {
return browser.toLowerCase().split(/[ /-]/)[0];
}
Expand All @@ -20,14 +20,9 @@ module.exports = function (config) {
},

// frameworks to use
frameworks: [
"chai-sinon",
"mocha"
],
frameworks: ["chai-sinon", "mocha"],

files: [
"./test/test.js"
],
files: ["./test/test.js"],

preprocessors: {
// add webpack as preprocessor
Expand All @@ -37,21 +32,25 @@ module.exports = function (config) {
coverageReporter: {
dir: "coverage/json",
includeAllSources: true,
reporters: [{
type: "json",
subdir: normalizationBrowserName
}]
reporters: [
{
type: "json",
subdir: normalizationBrowserName
}
]
},

webpack: {
devtool: "inline-source-map",
module: {
rules: [{
test: /\.js$/,
// exclude this dirs from coverage
exclude: [/node_modules/],
loader: "babel-loader"
}]
rules: [
{
test: /\.js$/,
// exclude this dirs from coverage
exclude: [/node_modules/],
loader: "babel-loader"
}
]
},
watch: true
},
Expand All @@ -62,10 +61,7 @@ module.exports = function (config) {

// test results reporter to use
// possible values: "dots", "progress", "junit", "growl", "coverage"
reporters: [
"coverage",
"spec"
],
reporters: ["coverage", "spec"],

// web server port
port: 9876,
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@
"cz-conventional-changelog": "^2.0.0",
"eslint": "^3.18.0",
"eslint-config-nfl": "^11.1.0",
"eslint-config-prettier": "^2.2.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-mocha": "^4.9.0",
"eslint-plugin-prettier": "^2.1.2",
"eslint-plugin-react": "^6.10.2",
"istanbul": "^0.4.5",
"karma": "^1.5.0",
Expand All @@ -76,6 +78,7 @@
"karma-webpack": "^2.0.3",
"mocha": "^3.2.0",
"phantomjs-prebuilt": "^2.1.14",
"prettier": "^1.4.4",
"react": "^15.x",
"react-dom": "^15.x",
"rimraf": "^2.6.1",
Expand All @@ -86,7 +89,7 @@
"scripts": {
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"clean": "rimraf lib coverage es",
"lint": "eslint --ignore-path .gitignore -- .",
"lint": "eslint --ignore-path .gitignore --fix -- .",
"test": "cross-env BABEL_ENV=test karma start karma.config.js",
"posttest": "istanbul report lcov text",
"pretest": "npm run clean && npm run lint",
Expand Down
Loading

0 comments on commit 39dc679

Please sign in to comment.