Getting started with material-ui

2020-07-13 10:30发布

问题:

Seems to me the well-kept secret is the material-ui, a web framework that uses Google's Material Design UI, plus React. I think it is a fantastic combination, and the future. However, it is also a well well-kept secret on how to use it. The Getting started guide at http://material-ui.com/#/get-started is not for normal Joe, but only for a tiny fraction of people that might understand it. Moreover, the questions here, like How to use material-ui framework?, material ui Installation configure, have never been answered.

I managed to get material-ui installed,

  $ npm install material-ui
  react-tap-event-plugin@0.1.6 node_modules/react-tap-event-plugin

  react@0.13.2 node_modules/react
   envify@3.4.0 (through@2.3.7, jstransform@10.1.0)

  material-ui@0.7.4 node_modules/material-ui
   classnames@1.2.1
   react-draggable2@0.5.1

  $ ls -d1 node_modules/*
  node_modules/material-ui
  node_modules/react
  node_modules/react-tap-event-plugin

but what's next?

  • Should I move them under my /var/www/? Or start nodejs, or...?
  • How can I see a simple demo that show everything is working?

All in all, as someone who knows only http servers and static html pages, what's the simplest way for me to see it is working with my existing web server in my own environment?

Thanks

$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.10
Release:        14.10
Codename:       utopic

$ uname -srmv
Linux 3.16.0-34-generic #47-Ubuntu SMP Fri Apr 10 18:02:58 UTC 2015 x86_64

回答1:

To start an example just follow the instructions from github.

cd <project folder>/material-ui/example
npm install
npm start

and open a http://localhost:8000/ in your browser.