Wanted to suggest that instructions on using WebPack as a deployment solution for muicss would be welcome in the Getting Started documentation. Here's a basic run-down of how to integrate the components as far as I can see it (I'm just experimenting with using muicss now).
Modify your webpack.base.config.js to use the plugins:
var path = require("path");
var webpack = require('webpack');
var BundleTracker = require('webpack-bundle-tracker');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
Add it to your plugins list:
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new BundleTracker({
filename: './bundles/webpack-stats.json'
}),
new ExtractTextPlugin("[name]-[hash].css"),
new webpack.optimize.CommonsChunkPlugin({
names: ['vendor']
}),
]
Now create a .scss file on your import path (internal-javascript in the example) that you use to customise your colour scheme, for instance (internal-javascript/scss/company.scss):
and then import that .scss file from your bundle's root javascript file:
require( 'scss/company.scss' );
and then import your mui react components like so:
import Button from 'muicss/lib/react/button';
...
<Button>Hello World!</Button>
Anyway, it seems likely to me that having this kind of documentation may be helpful for those wanting to integrate muicss into their builds. Hope this helps.
Thanks! This is very helpful. I'll keep this issue open for now and think about how to incorporate the weback instructions into the main documentation.
Wanted to suggest that instructions on using WebPack as a deployment solution for muicss would be welcome in the Getting Started documentation. Here's a basic run-down of how to integrate the components as far as I can see it (I'm just experimenting with using muicss now).
Install your dependencies:
Modify your webpack.base.config.js to use the plugins:
Add it to your plugins list:
Configure your module loaders:
Add .css and .scss file to your set of webpack require-able modules:
Now create a .scss file on your import path (internal-javascript in the example) that you use to customise your colour scheme, for instance (internal-javascript/scss/company.scss):
and then import that .scss file from your bundle's root javascript file:
and then import your mui react components like so:
Anyway, it seems likely to me that having this kind of documentation may be helpful for those wanting to integrate muicss into their builds. Hope this helps.