Working with my website, I've incorporated the material-ui
package, but the version available on npm
is outdated compared to the latest one on Github. To reflect these updates, I manually inserted this line of code into their Theme Manager class:
setContentFontFamily(newContentFontFamily) {
if (typeof newContentFontFamily !== "undefined" && newContentFontFamily !== null) {
this.contentFontFamily = newContentFontFamily;
this.component = Extend(this.component, this.template.getComponentThemes(this.palette, this.spacing));
}
},
Despite making these changes, my application doesn't seem to recognize them when attempting to set a font:
ThemeManager.setContentFontFamily('Open Sans, Roboto, sans serif');
Upon doing so, an error appears in the console:
Uncaught TypeError: ThemeManager.setContentFontFamily is not a function
I utilize Browserify for bundling client side 'require' dependencies. Could this issue be related to Browserify, an npm
glitch, or is there a misunderstanding on how node modules operate?
Edit: Here's a snippet from my package.json
:
{
"name": "FooProject",
"version": "0.0.0",
"description": "",
"dependencies": {
"highlight.js": "^8.7.0",
"material-ui": "callemall/material-ui",
"react": "^0.13.3",
"react-bootstrap": "^0.24.5",
"react-highlight": "^0.5.0",
"react-tap-event-plugin": "^0.1.7",
"underscore": "^1.8.3"
},
"author": "Tina Zheng",
"devDependencies": {
"babelify": "^6.1.3",
"bower": "^1.4.1",
"browserify": "^11.0.1",
"gulp": "^3.9.0",
"gulp-react": "^3.0.1",
"gulp-reactify": "^3.0.1"
}
}