Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Totally lost on how to build this #63

Closed
ofsaleem opened this issue Nov 14, 2014 · 5 comments
Closed

Totally lost on how to build this #63

ofsaleem opened this issue Nov 14, 2014 · 5 comments
Labels
docs Improvements or additions to the documentation

Comments

@ofsaleem
Copy link

I'm completely new to the world of CSS frameworks, and I'm having a lot of trouble getting material-ui to work for me. My steps so far:

Installed Node.js and npm. npm installed less, browserify, reactify, and material-ui. Then I used less to compile components.less and scaffolding.less into a main.css. My understanding is that these two .less files will incorporate all of the other css in the directory. I copied this main.css file into my document root, and added a link to the stylesheet in the index.html. This seemed to work as my text changed to look like the example page. Then I used browserify on the index.js file in the src directory to create a main.js file. At the bottom of my body tag in my index.html I added a <script src = main.js> tag to include the main.js file.

So the next step was to start using the components, but I can't get any of them to work, for example
does nothing, and none of the other example components do either. The instructions listed in the "Usage" section of the instructions don't really make sense to me. I've tried including that code in a script tag in my index.html and it didn't do anything, and Webstorm had a bunch of issues with the code too. So I'm not really sure where else to put that, or how else to start including components.

Can anyone point me in the right direction? I've tried googling around but I haven't been able to find any resources that seem to be relevant.

@hai-cea
Copy link
Member

hai-cea commented Nov 15, 2014

You can clone this repo and compile the docs site to see how everything works. Check out:
https://github.com/callemall/material-ui/tree/master/docs

@ofsaleem
Copy link
Author

I looked into it, but I have no idea how to build it. I once again managed to get a main.css but there's no index.js so I couldn't use browserify. The instructions say to install gulp and then run it, which I did, but I just got an error about not having a require-dir module. I need a little bit more specific instructions than just "compile," if I knew how to build things directly I would be less lost. Appreciate your time and effort.

@hai-cea
Copy link
Member

hai-cea commented Nov 15, 2014

Try running npm install in both the root folder and then the docs folder. After, that you should just be able to run gulp and the site will launch.

Hope that helps.
Hai

@ofsaleem
Copy link
Author

That didn't help (still got the same error about require-dir), however I wiped out my Node installation totally, including all the npm modules, and started over. Following your instructions this time, it worked (though I do have node-modules directories in every subdir now, oh well). Thanks, I'll try to figure this out from the docs build. Much appreciated.

@hai-cea
Copy link
Member

hai-cea commented Nov 15, 2014

Closing since this is a dup of #58

@hai-cea hai-cea closed this as completed Nov 15, 2014
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2022
@zannager zannager added docs Improvements or additions to the documentation and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

No branches or pull requests

4 participants