Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/app.css

Large diffs are not rendered by default.

32,980 changes: 1,607 additions & 31,373 deletions dist/main.js

Large diffs are not rendered by default.

114 changes: 20 additions & 94 deletions dist/main.min.js

Large diffs are not rendered by default.

304 changes: 168 additions & 136 deletions dist/main.source.js

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "",
"scripts": {
"prebuild": "webpack --config sourcemaps.config.js",
"build": "webpack",
"build": "cross-env NODE_ENV=production webpack",
"postbuild": "minify dist/main.js > dist/main.min.js",
"lint": "eslint react/src/js/components/Consonant --fix",
"release": "HUSKY_SKIP_HOOKS=1 release-it --ci",
Expand Down Expand Up @@ -77,6 +77,7 @@
"babel-loader": "^7.1.4",
"babel-plugin-istanbul": "^4.1.6",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-env": "^1.7.0",
"babel-preset-jest": "^22.4.4",
Expand Down Expand Up @@ -116,6 +117,7 @@
"postcss": "^8.4.31",
"postcss-sass": "^0.2.0",
"puppeteer": "^23.6.1",
"react-axe": "^3.5.4",
"regenerator-runtime": "^0.11.1",
"reset-css": "^2.2.1",
"s3-deploy": "^1.4.0",
Expand Down
6 changes: 6 additions & 0 deletions react/src/js/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import { parseToPrimitive } from './components/Consonant/Helpers/general';
import { loadLana } from './components/Consonant/Helpers/lana';
import Container from './components/Consonant/Container/Container';
import consonantPageRDC from './components/Consonant/Page/ConsonantPageDOM';
// Runtime accessibility auditing in development with react-axe
if (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined') {
/* eslint-disable-next-line global-require */
const ReactAxe = require('react-axe');
ReactAxe(React, ReactDOM, 1000);
}

const domRegistry = new DOMRegistry(React, render);
domRegistry.register({
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ const plugins = [
`,
entryOnly: true,
}),
// Inject environment variable for conditional code removal
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
}),
];

module.exports = {
Expand Down
Loading