Skip to content

Commit

Permalink
[docs] Improve npm experience
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Sep 10, 2023
1 parent 8087943 commit c13a33b
Show file tree
Hide file tree
Showing 11 changed files with 155 additions and 85 deletions.
88 changes: 24 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- markdownlint-disable-next-line -->
<p align="center">
<a href="https://mui.com/core/" rel="noopener" target="_blank"><img width="150" height="133" src="/docs/public/static/logo.svg" alt="MUI Core logo"></a>
<a href="https://mui.com/core/" rel="noopener" target="_blank"><img width="150" height="133" src="https://mui.com/static/logo.svg" alt="MUI Core logo"></a>
</p>

<h1 align="center">MUI Core</h1>
Expand Down Expand Up @@ -31,15 +31,11 @@

</div>

## Installation
## Documentation

### Material UI

Material UI is available as an [npm package](https://www.npmjs.com/package/@mui/material).

```bash
npm install @mui/material @emotion/react @emotion/styled
```
[Get started](https://mui.com/material-ui/)

<details>
<summary>Older versions</summary>
Expand All @@ -53,32 +49,23 @@ npm install @mui/material @emotion/react @emotion/styled
**Note:** `@next` only points to pre-releases.
Use `@latest` for the latest stable release.

### Base UI
### Joy UI

Base UI is available as an [npm package](https://www.npmjs.com/package/@mui/base).
[Get started](https://mui.com/joy-ui/getting-started/)

```bash
npm install @mui/base
```

**Note**: Base UI is still in beta.
**Note**: Joy UI is still in beta.
We are adding new components regularly and you're welcome to contribute!

### MUI System

MUI System is available as an [npm package](https://www.npmjs.com/package/@mui/system).
### Base UI

```bash
npm install @mui/system @emotion/react @emotion/styled
```
[Get started](https://mui.com/base-ui/)

Or if you want to use styled-components as the styling engine:
**Note**: Base UI is still in beta.
We are adding new components regularly and you're welcome to contribute!

```bash
npm install @mui/material @mui/styled-engine-sc styled-components
```
### MUI System

Visit our [styled-components guide](https://mui.com/material-ui/guides/styled-components/) for more information on configuration.
[Get started](https://mui.com/system/getting-started/)

## Sponsors

Expand Down Expand Up @@ -112,42 +99,15 @@ Gold Sponsors are those who have pledged \$500/month or more to MUI.

See the full list of [our backers](https://mui.com/material-ui/discover-more/backers/).

## Getting started with Material UI

Here is an example of a basic app using Material UI's `Button` component:

```jsx
import * as React from 'react';
import Button from '@mui/material/Button';

function App() {
return <Button variant="contained">Hello World</Button>;
}
```

In the interactive demo below, try changing the code and see how it affects the output.
(Hint: change `variant` to `"outlined"` and `color` to `"secondary"`.
For more options, see the [`Button` component page](https://mui.com/material-ui/react-button/) in our docs.)

[![Edit Button](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/material-ui-u9sy1h)

## Questions

For how-to questions that don't involve making changes to the code base, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/material-ui) instead of GitHub issues.
Use the "mui" tag on Stack Overflow to make it easier for the community to find your question.
For how-to questions that don't involve making changes to the code base, please use [Stack Overflow](https://stackoverflow.com/questions/) instead of GitHub issues.

## Examples

Our documentation features [a collection of example projects using Material UI](https://mui.com/material-ui/getting-started/example-projects/).

## Documentation

- [Material UI](https://mui.com/material-ui)
- [Joy UI](https://mui.com/joy-ui/getting-started/)
- [Base UI](https://mui.com/base-ui/)
- [MUI System](https://mui.com/system/getting-started/)
Our documentation features [a collection of example projects](https://github.com/mui/material-ui/tree/master/examples).

## Premium themes
## Premium templates

You can find complete templates and themes in the [MUI Store](https://mui.com/store/?utm_source=docs&utm_medium=referral&utm_campaign=readme-store).

Expand Down Expand Up @@ -180,25 +140,25 @@ For details of supported versions and contact details for reporting security iss
These great services sponsor MUI's core infrastructure:

<picture>
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/github-darkmode.svg">
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/github-lightmode.svg">
<img alt="GitHub logo" src="/docs/public/static/readme/github-lightmode.svg" width="80" height="43">
<source media="(prefers-color-scheme: dark)" srcset="https://mui.com/static/readme/github-darkmode.svg">
<source media="(prefers-color-scheme: light)" srcset="https://mui.com/static/readme/github-lightmode.svg">
<img alt="GitHub logo" src="https://mui.com/static/readme/github-lightmode.svg" width="80" height="43">
</picture>

[GitHub](https://github.com/) lets us host the Git repository and coordinate contributions.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/netlify-darkmode.svg">
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/netlify-lightmode.svg">
<img alt="Netlify logo" src="/docs/public/static/readme/netlify-lightmode.svg" width="100" height="27" style="margin-top: 1rem;">
<source media="(prefers-color-scheme: dark)" srcset="https://mui.com/static/readme/netlify-darkmode.svg">
<source media="(prefers-color-scheme: light)" srcset="https://mui.com/static/readme/netlify-lightmode.svg">
<img alt="Netlify logo" src="https://mui.com/static/readme/netlify-lightmode.svg" width="100" height="27" style="margin-top: 1rem;">
</picture>

[Netlify](https://www.netlify.com/) lets us distribute the documentation.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/browserstack-darkmode.svg">
<source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/browserstack-lightmode.svg">
<img alt="BrowserStack logo" src="/docs/public/static/readme/browserstack-lightmode.svg" width="140" height="25" style="margin-top: 1rem;">
<source media="(prefers-color-scheme: dark)" srcset="https://mui.com/static/readme/browserstack-darkmode.svg">
<source media="(prefers-color-scheme: light)" srcset="https://mui.com/static/readme/browserstack-lightmode.svg">
<img alt="BrowserStack logo" src="https://mui.com/static/readme/browserstack-lightmode.svg" width="140" height="25" style="margin-top: 1rem;">
</picture>

[BrowserStack](https://www.browserstack.com/) lets us test in real browsers.
Expand Down
42 changes: 40 additions & 2 deletions packages/mui-base/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Base UI
<!-- markdownlint-disable-next-line -->
<p align="center">
<a href="https://mui.com/base-ui/" rel="noopener" target="_blank"><img width="150" height="133" src="https://mui.com/static/logo.svg" alt="Base UI logo"></a>
</p>

<h1 align="center">Base UI</h1>

Base UI is a library of unstyled React UI components and hooks. With Base UI, you gain complete control over your app's CSS and accessibility features.

Expand All @@ -14,8 +19,41 @@ npm install @mui/base

<!-- #default-branch-switch -->

[The documentation](https://mui.com/base-ui/)
Visit [https://mui.com/base-ui/](https://mui.com/base-ui/) to view the full documentation.

## Questions

For how-to questions that don't involve making changes to the code base, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/base-ui) instead of GitHub issues.
Use the "base-ui" tag on Stack Overflow to make it easier for the community to find your question.

## Contributing

See [the contributing guide](./CONTRIBUTING.md) if you wish to implement Base UI components or hooks.

## Examples

Our documentation features [a collection of example projects using Joy UI](https://github.com/mui/material-ui/tree/master/examples).

## Contributing

Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.

Contributing to MUI Core is about more than just issues and pull requests!
There are many other ways to [support MUI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.

## Changelog

The [changelog](https://github.com/mui/material-ui/releases) is regularly updated to reflect what's changed in each new release.

## Roadmap

Future plans and high-priority features and enhancements can be found in our [roadmap](https://mui.com/material-ui/discover-more/roadmap/).

## License

This project is licensed under the terms of the
[MIT license](/LICENSE).

## Security

For details of supported versions and contact details for reporting security issues, please refer to the [security policy](https://github.com/mui/material-ui/security/policy).
4 changes: 2 additions & 2 deletions packages/mui-icons-material/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ npm install @mui/material

<!-- #default-branch-switch -->

- [The documentation](https://mui.com/material-ui/icons/#svgicon)
- [The icons search](https://mui.com/material-ui/material-icons/)
- [The SvgIcon documentation](https://mui.com/material-ui/icons/#svgicon)
- [The Material Design icons search](https://mui.com/material-ui/material-icons/)

## Contributing

Expand Down
42 changes: 40 additions & 2 deletions packages/mui-joy/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Joy UI
<!-- markdownlint-disable-next-line -->
<p align="center">
<a href="https://mui.com/joy-ui/getting-started/" rel="noopener" target="_blank"><img width="150" height="133" src="https://mui.com/static/logo.svg" alt="Joy UI logo"></a>
</p>

<h1 align="center">Joy UI</h1>

Joy UI is a library of beautifully designed React UI components built to spark joy.

Expand All @@ -12,4 +17,37 @@ npm install @mui/joy @emotion/react @emotion/styled

## Documentation

[The documentation](https://mui.com/joy-ui/getting-started/)
Visit [https://mui.com/joy-ui/getting-started/](https://mui.com/joy-ui/getting-started/) to view the full documentation.

## Questions

For how-to questions that don't involve making changes to the code base, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/joy-ui) instead of GitHub issues.
Use the "joy-ui" tag on Stack Overflow to make it easier for the community to find your question.

## Examples

Our documentation features [a collection of example projects using Joy UI](https://github.com/mui/material-ui/tree/master/examples).

## Contributing

Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.

Contributing to MUI Core is about more than just issues and pull requests!
There are many other ways to [support MUI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.

## Changelog

The [changelog](https://github.com/mui/material-ui/releases) is regularly updated to reflect what's changed in each new release.

## Roadmap

Future plans and high-priority features and enhancements can be found in our [roadmap](https://mui.com/material-ui/discover-more/roadmap/).

## License

This project is licensed under the terms of the
[MIT license](/LICENSE).

## Security

For details of supported versions and contact details for reporting security issues, please refer to the [security policy](https://github.com/mui/material-ui/security/policy).
2 changes: 1 addition & 1 deletion packages/mui-lab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ npm install @mui/material @emotion/react @emotion/styled

<!-- #default-branch-switch -->

[The documentation](https://mui.com/material-ui/about-the-lab/)
Visit [https://mui.com/material-ui/about-the-lab/](https://mui.com/material-ui/about-the-lab/) to view the full documentation.
42 changes: 40 additions & 2 deletions packages/mui-material/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Material UI
<!-- markdownlint-disable-next-line -->
<p align="center">
<a href="https://mui.com/material-ui/" rel="noopener" target="_blank"><img width="150" height="133" src="https://mui.com/static/logo.svg" alt="Material UI logo"></a>
</p>

<h1 align="center">Material UI</h1>

Material UI is a comprehensive library of components that features our implementation of Google's [Material Design](https://m2.material.io/design/introduction/) system.

Expand All @@ -12,4 +17,37 @@ npm install @mui/material

## Documentation

[The documentation](https://mui.com/material-ui/)
Visit [https://mui.com/material-ui/](https://mui.com/material-ui/) to view the full documentation.

## Questions

For how-to questions that don't involve making changes to the code base, please use [Stack Overflow](https://stackoverflow.com/questions/tagged/material-ui) instead of GitHub issues.
Use the "material-ui" tag on Stack Overflow to make it easier for the community to find your question.

## Examples

Our documentation features [a collection of example projects using Material UI](https://mui.com/material-ui/getting-started/example-projects/).

## Contributing

Read the [contributing guide](/CONTRIBUTING.md) to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes.

Contributing to MUI Core is about more than just issues and pull requests!
There are many other ways to [support MUI](https://mui.com/material-ui/getting-started/faq/#mui-is-awesome-how-can-i-support-the-project) beyond contributing to the code base.

## Changelog

The [changelog](https://github.com/mui/material-ui/releases) is regularly updated to reflect what's changed in each new release.

## Roadmap

Future plans and high-priority features and enhancements can be found in our [roadmap](https://mui.com/material-ui/discover-more/roadmap/).

## License

This project is licensed under the terms of the
[MIT license](/LICENSE).

## Security

For details of supported versions and contact details for reporting security issues, please refer to the [security policy](https://github.com/mui/material-ui/security/policy).
2 changes: 1 addition & 1 deletion packages/mui-styled-engine-sc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ It's designed for developers who would like to use `styled-components` as the ma

<!-- #default-branch-switch -->

[The documentation](https://mui.com/material-ui/guides/styled-components/)
Visit [https://mui.com/material-ui/guides/styled-components/](https://mui.com/material-ui/guides/styled-components/) to view the full documentation.
2 changes: 1 addition & 1 deletion packages/mui-styled-engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ It is used internally in the `@mui/system` package.

<!-- #default-branch-switch -->

[The documentation](https://mui.com/material-ui/guides/styled-components/)
Visit [https://mui.com/material-ui/guides/styled-components/](https://mui.com/material-ui/guides/styled-components/) to view the full documentation.
2 changes: 1 addition & 1 deletion packages/mui-styles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ npm install @mui/styles

## Documentation

[The documentation](https://mui.com/system/styles/basics/)
Visit [https://mui.com/system/styles/basics/](https://mui.com/system/styles/basics/) to view the full documentation.
4 changes: 2 additions & 2 deletions packages/mui-system/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MUI System

CSS utilities for rapidly laying out custom designs.
MUI System is a collection of CSS utilities to help you rapidly lay out custom designs.

## Installation

Expand All @@ -16,4 +16,4 @@ npm install @mui/system @emotion/react @emotion/styled

<!-- #default-branch-switch -->

[The documentation](https://mui.com/system/getting-started/)
Visit [https://mui.com/system/getting-started/](https://mui.com/system/getting-started/) to view the full documentation.
10 changes: 3 additions & 7 deletions scripts/copyFiles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,9 @@ async function run() {
const packageData = await createPackageFile();

await Promise.all(
[
// use enhanced readme from workspace root for `@mui/material`
packageData.name === '@mui/material' ? '../../README.md' : './README.md',
'../../CHANGELOG.md',
'../../LICENSE',
...extraFiles,
].map((file) => includeFileInBuild(file)),
['./README.md', '../../CHANGELOG.md', '../../LICENSE', ...extraFiles].map((file) =>
includeFileInBuild(file),
),
);

await addLicense(packageData);
Expand Down

0 comments on commit c13a33b

Please sign in to comment.