run a11y checker in development
This commit is contained in:
parent
125ac9a167
commit
ba8c68c461
@ -26,6 +26,7 @@
|
|||||||
"lodash.uniq": "^4.5.0",
|
"lodash.uniq": "^4.5.0",
|
||||||
"querystring": "^0.2.0",
|
"querystring": "^0.2.0",
|
||||||
"react": "^15.3.2",
|
"react": "^15.3.2",
|
||||||
|
"react-a11y": "^0.3.3",
|
||||||
"react-dom": "^15.3.2",
|
"react-dom": "^15.3.2",
|
||||||
"react-hot-loader": "^3.0.0-beta.6",
|
"react-hot-loader": "^3.0.0-beta.6",
|
||||||
"react-intl": "^2.1.5",
|
"react-intl": "^2.1.5",
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
const a11y = require('react-a11y');
|
||||||
const ReactDOM = require('react-dom');
|
const ReactDOM = require('react-dom');
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
|
a11y(React, {
|
||||||
|
ReactDOM
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const render = () => {
|
const render = () => {
|
||||||
const Root = require('./root');
|
const Root = require('./root');
|
||||||
|
|
||||||
|
@ -4054,7 +4054,7 @@ object-keys@^1.0.10, object-keys@^1.0.8:
|
|||||||
version "1.0.11"
|
version "1.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
object.assign@^4.0.4:
|
object.assign@^4.0.3, object.assign@^4.0.4:
|
||||||
version "4.0.4"
|
version "4.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc"
|
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -5001,6 +5001,12 @@ rc@^1.0.1, rc@^1.1.6, rc@~1.1.0:
|
|||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
strip-json-comments "~1.0.4"
|
strip-json-comments "~1.0.4"
|
||||||
|
|
||||||
|
react-a11y:
|
||||||
|
version "0.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-a11y/-/react-a11y-0.3.3.tgz#310edd466b81371d76cd1dc9a5d90758dbac3840"
|
||||||
|
dependencies:
|
||||||
|
object.assign "^4.0.3"
|
||||||
|
|
||||||
react-addons-test-utils@^15.3.2:
|
react-addons-test-utils@^15.3.2:
|
||||||
version "15.3.2"
|
version "15.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.3.2.tgz#c09a44f583425a4a9c1b38444d7a6c3e6f0f41f6"
|
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.3.2.tgz#c09a44f583425a4a9c1b38444d7a6c3e6f0f41f6"
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
|
const a11y = require('react-a11y');
|
||||||
const ReactDOM = require('react-dom');
|
const ReactDOM = require('react-dom');
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV !== 'production') {
|
||||||
|
a11y(React, {
|
||||||
|
ReactDOM
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const render = () => {
|
const render = () => {
|
||||||
const Root = require('./root');
|
const Root = require('./root');
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"classnames": "^2.2.5",
|
"classnames": "^2.2.5",
|
||||||
"lodash.flatten": "^4.4.0",
|
"lodash.flatten": "^4.4.0",
|
||||||
"react": "^15.3.2"
|
"react": "^15.3.2",
|
||||||
|
"react-a11y": "^0.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"ava": "^0.16.0",
|
"ava": "^0.16.0",
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
const pkg = require('../package.json');
|
||||||
const base = require('./base.js');
|
const base = require('./base.js');
|
||||||
const entries = require('./entrypoints');
|
const entries = require('./entrypoints');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
@ -24,7 +25,14 @@ module.exports = Object.assign(base.config, {
|
|||||||
return all;
|
return all;
|
||||||
}, {}),
|
}, {}),
|
||||||
plugins: base.config.plugins.concat([
|
plugins: base.config.plugins.concat([
|
||||||
new webpack.HotModuleReplacementPlugin()
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
|
new webpack.DefinePlugin({
|
||||||
|
'process.env': {
|
||||||
|
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'development'),
|
||||||
|
APP_NAME: JSON.stringify(pkg.name),
|
||||||
|
APP_VERSION: JSON.stringify(pkg.version)
|
||||||
|
}
|
||||||
|
})
|
||||||
]),
|
]),
|
||||||
devtool: 'source-map',
|
devtool: 'source-map',
|
||||||
devServer
|
devServer
|
||||||
|
@ -3911,7 +3911,7 @@ object-keys@^1.0.10, object-keys@^1.0.8:
|
|||||||
version "1.0.11"
|
version "1.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
object.assign@^4.0.4:
|
object.assign@^4.0.3, object.assign@^4.0.4:
|
||||||
version "4.0.4"
|
version "4.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc"
|
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc"
|
||||||
dependencies:
|
dependencies:
|
||||||
@ -4907,6 +4907,12 @@ rc@^1.0.1, rc@^1.1.6, rc@~1.1.0:
|
|||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
strip-json-comments "~1.0.4"
|
strip-json-comments "~1.0.4"
|
||||||
|
|
||||||
|
react-a11y:
|
||||||
|
version "0.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-a11y/-/react-a11y-0.3.3.tgz#310edd466b81371d76cd1dc9a5d90758dbac3840"
|
||||||
|
dependencies:
|
||||||
|
object.assign "^4.0.3"
|
||||||
|
|
||||||
react-addons-test-utils@^15.3.2:
|
react-addons-test-utils@^15.3.2:
|
||||||
version "15.3.2"
|
version "15.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.3.2.tgz#c09a44f583425a4a9c1b38444d7a6c3e6f0f41f6"
|
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.3.2.tgz#c09a44f583425a4a9c1b38444d7a6c3e6f0f41f6"
|
||||||
|
Loading…
Reference in New Issue
Block a user