Skip to content

Commit

Permalink
[core] Upgrade the dev dependencies (#13016)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Sep 27, 2018
1 parent 51bb15c commit 9901d4c
Show file tree
Hide file tree
Showing 5 changed files with 396 additions and 253 deletions.
4 changes: 2 additions & 2 deletions docs/src/modules/components/AppWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MuiThemeProvider } from '@material-ui/core/styles';
import JssProvider from 'react-jss/lib/JssProvider';
import { lightTheme, darkTheme, setPrismTheme } from '@material-ui/docs/MarkdownElement/prism';
import getPageContext, { updatePageContext } from 'docs/src/modules/styles/getPageContext';
import GoogleTag from 'docs/src/modules/components/GoogleTag';
import GoogleAnalytics from 'docs/src/modules/components/GoogleAnalytics';

// Inject the insertion-point-jss after docssearch
if (process.browser && !global.__INSERTION_POINT__) {
Expand Down Expand Up @@ -86,7 +86,7 @@ class AppWrapper extends React.Component {
>
<MuiThemeProvider theme={pageContext.theme} sheetsManager={pageContext.sheetsManager}>
{children}
<GoogleTag />
<GoogleAnalytics />
</MuiThemeProvider>
</JssProvider>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import React from 'react';

class GoogleTag extends React.Component {
googleTimer = null;
class GoogleAnalytics extends React.Component {
timer = null;

componentDidMount() {
if (process.env.NODE_ENV !== 'production') {
return;
}

// Wait for the title to be updated.
this.googleTimer = setTimeout(() => {
window.ga('send', {
hitType: 'pageview',
this.timer = setTimeout(() => {
window.ga('set', {
page: window.location.pathname,
});
}, 0);
window.ga('send', { hitType: 'pageview' });
});
}

componentWillUnmount() {
clearTimeout(this.googleTimer);
clearTimeout(this.timer);
}

render() {
return null;
}
}

export default GoogleTag;
export default GoogleAnalytics;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"karma-webpack": "^3.0.0",
"lz-string": "^1.4.4",
"mocha": "^5.0.0",
"next": "^7.0.0-canary.0",
"next": "^7.0.0",
"nyc": "^13.0.0",
"postcss": "^7.0.0",
"prettier": "^1.8.2",
Expand All @@ -136,7 +136,7 @@
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"react-select": "^2.0.0",
"react-swipeable-views": "^0.12.10",
"react-swipeable-views": "^0.13.0",
"react-test-renderer": "^16.1.1",
"react-text-mask": "^5.0.2",
"recast": "^0.15.0",
Expand All @@ -158,7 +158,7 @@
"url-loader": "^1.0.1",
"vrtest": "^0.2.0",
"webfontloader": "^1.6.28",
"webpack": "4.16.3",
"webpack": "4.20.2",
"webpack-bundle-analyzer": "^3.0.0",
"webpack-cli": "^3.1.0",
"workbox-build": "^3.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"fs-extra": "^7.0.0",
"mkdirp": "^0.5.0",
"mustache": "^2.0.0",
"mustache": "^3.0.0",
"svgo": "^1.0.5",
"temp": "^0.8.3",
"yargs": "^12.0.0"
Expand Down
Loading

0 comments on commit 9901d4c

Please sign in to comment.