generator-react-material-ui
generator-react-material-ui copied to clipboard
Out of date version of material-ui
This package currently uses "material-ui": "^0.3.1" in dependencies, from November 28, 2014. material-ui is up to version 0.10.1.
This causes the Material-UI documentation to list many components and properties that are unavailable for this package.
Manually updating material-ui to 0.10.1 causes this gulp task to fail:
/*
* Copies the `material-ui` CSS (LESS) framework from the `node_modules` folder
* without checking (and then deleting) for an exsting folder in the
* destination.
*/
gulp.task('copy-material-no-clear', function (done) {
var source =
path.join(__dirname, 'node_modules', 'material-ui', 'src', 'less');
var dest = path.join(__dirname, 'src', 'style', 'material-ui');
ncp(source, dest, done);
});
because there is no longer a node_modules/material-ui/src/less folder.
I was able to get it to work by disabling the clear-material and copy-material gulp tasks:
diff --git a/gulpfile.js b/gulpfile.js
index 0053b67..eb31f17 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -45,7 +45,7 @@ gulp.task('clear-build', function (done) {
* Clears out all the stuff that have been generated during development.
*/
gulp.task('clean', function(done) {
- return runsequence('clear-material', 'clear-build', done);
+ return runsequence(/*'clear-material', */'clear-build', done);
});
/*
@@ -131,7 +131,7 @@ gulp.task('index', function (done) {
gulp.task('build', function (done) {
return runsequence(
'clean',
- 'copy-material',
+ // 'copy-material',
['style', 'less', 'js'],
'index',
done
and then adding:
// Important!
childContextTypes: {
muiTheme: React.PropTypes.object
},
// Important!
getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
};
},
to the Master component in src/app.jsx, and:
var ThemeManager = new mui.Styles.ThemeManager();
to the top of that file.