Skip to content

Commit

Permalink
[docs] Use next.js (#7759)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored and Sebastian Sebald committed Aug 23, 2017
1 parent 09457cd commit 4cc74da
Show file tree
Hide file tree
Showing 398 changed files with 5,364 additions and 6,245 deletions.
45 changes: 45 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,51 @@
"transform-flow-strip-types"
]
},
"docs-development": {
"presets": [
"next/babel"
],
"plugins": [
"preval",
[
"module-resolver",
{
"alias": {
"pages": "./pages",
"material-ui": "./src",
"material-ui-icons": './packages/material-ui-icons/src',
"docs": "./docs"
}
}
],
"flow-react-proptypes",
"transform-flow-strip-types"
]
},
"docs-production": {
"presets": [
"next/babel"
],
"plugins": [
"preval",
[
"module-resolver",
{
"alias": {
"pages": "./pages",
"material-ui": "./src",
"material-ui-icons": './packages/material-ui-icons/src',
"docs": "./docs"
}
}
],
"transform-react-constant-elements",
"transform-dev-warning",
"transform-runtime",
["react-remove-properties", {"properties": ["data-mui-test"]}],
["transform-react-remove-prop-types", {"mode": "remove"}]
]
},
"test": {
"sourceMaps": "both",
"plugins": [
Expand Down
27 changes: 13 additions & 14 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
node_modules
/build/
/tmp/
/coverage/
/docs/build/
/flow/
/flow-typed/
/packages/*/lib/
/packages/material-ui-icons/build/
/packages/material-ui-icons/test/fixtures/
/packages/material-ui-icons/src/
/packages/material-ui-icons/tpl/
/packages/material-ui-codemod/modules/v0.15.0/
/test/coverage/
/test/regressions/site/build/
build
/tmp
coverage
/.next
/next.config.js
/docs/export
/flow
/flow-typed
/packages/*/lib
/packages/material-ui-icons/test/fixtures
/packages/material-ui-icons/src
/packages/material-ui-icons/tpl
/packages/material-ui-codemod/modules/v0.15.0
/.git
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module.exports = {
// So parent files don't get applied
root: true,
globals: {
preval: false,
},
env: {
es6: true,
browser: true,
Expand Down
3 changes: 2 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ flow/interfaces

esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable

module.file_ext=.js
module.file_ext=.md
module.name_mapper='.*\.\(html\|css\|svg\|png\|jpg\|gif\)$' -> '<PROJECT_ROOT>/flow/stubs/url-loader.js'
module.name_mapper='^material-ui\/\(.*\)$' -> '<PROJECT_ROOT>/src/\1'
module.name_mapper='^material-ui-docs\/\(.*\)$' -> '<PROJECT_ROOT>/docs/\1'
Expand Down
13 changes: 7 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Exclude compiled files
build
coverage
/lib
/test/regressions/screenshots/output
/test/selenium-output
.eslintcache
tmp
/.next
/.eslintcache
/docs/export
/tmp
coverage

# OS files
.DS_STORE

# Screenshors generated for Argos-CI
test/regressions/screenshots/
/test/regressions/screenshots
/test/selenium-output

# npm files
node_modules
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6.11
31 changes: 14 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ When in doubt, keep your pull requests small. To give a PR the best chance of ge

As with issues, please begin the title with [ComponentName].

When adding new features or modifying existing, please attempt to include tests to confirm the new behaviour. You can read more about our test setup [here](https://github.com/callemall/material-ui/blob/master/test/README.md).
When adding new features or modifying existing, please attempt to include tests to confirm the new behaviour. You can read more about our test setup [here](https://github.com/callemall/material-ui/blob/v1-beta/test/README.md).

### Branch Structure

All stable releases are tagged ([view tags](https://github.com/callemall/material-ui/tags)). At any given time, `master` represents the latest development version of the library. Patches or hotfix releases are prepared on an independent branch.
All stable releases are tagged ([view tags](https://github.com/callemall/material-ui/tags)). At any given time, `v1-beta` represents the latest development version of the library.
Patches or hotfix releases are prepared on an independent branch.

#### `master` is unsafe

We will do our best to keep `master` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with.
#### `v1-beta` is unsafe

We will do our best to keep `v1-beta` in good shape, with tests passing at all times. But in order to move fast, we will make API changes that your application might not be compatible with.

## Getting started

Please create a new branch from an up to date master on your fork. (Note, urgent hotfixes should be branched off the latest stable release rather than master)
Please create a new branch from an up to date v1-beta on your fork. (Note, urgent hotfixes should be branched off the latest stable release rather than v1-beta)

1. Fork the Material-UI repository on Github
2. Clone your fork to your local machine `git clone git@github.com:<yourname>/material-ui.git`
Expand All @@ -62,35 +62,32 @@ Please create a new branch from an up to date master on your fork. (Note, urgent
If you have an existing local repository, please update it before you start, to minimise the chance of merge conflicts.
```js
git remote add upstream git@github.com:callemall/material-ui.git
git checkout master
git pull upstream master
git checkout v1-beta
git pull upstream v1-beta
git checkout -b my-topic-branch
npm update
yarn
```

### Testing the documentation site

The documentation site is built with Material-UI, and contains examples of all the components. To get started:
```js
npm install
cd docs
npm install
npm start
yarn
yarn docs:dev
```
You can now access the documentation site [locally](http://localhost:3000).

Test coverage is limited at present, but where possible, please add tests for any changes you make. Tests can be run with `npm run test`.
Test coverage is limited at present, but where possible, please add tests for any changes you make. Tests can be run with `yarn test`.

### Coding style

Please follow the coding style of the current code base. Material-UI uses eslint, so if possible, enable linting in your editor to get realtime feedback. The linting rules are also run when Webpack recompiles your changes, and can be run manually with `npm run lint`.
Please follow the coding style of the current code base. Material-UI uses eslint, so if possible, enable linting in your editor to get realtime feedback. The linting rules are also run when Webpack recompiles your changes, and can be run manually with `yarn lint`.

You can also run linting on a subset of the codebase with `gulp eslint:src`, `gulp eslint:docs` or `gulp eslint:test`. Finally, when you submit a pull request, they are run again by Travis CI, but hopefully by then your code is already clean!

## Roadmap

To get a sense of where Material-UI is heading, or for ideas on where you could contribute, take a look at the [roadmap](https://github.com/callemall/material-ui/blob/master/ROADMAP.md) and the list of [Material Design components](https://github.com/callemall/material-ui/issues/2863).

To get a sense of where Material-UI is heading, or for ideas on where you could contribute, take a look at the [roadmap](https://github.com/callemall/material-ui/blob/v1-beta/ROADMAP.md) and the list of [Material Design components](https://github.com/callemall/material-ui/issues/2863).

## License

Expand Down
6 changes: 0 additions & 6 deletions database.rules.json

This file was deleted.

22 changes: 0 additions & 22 deletions docs/.babelrc

This file was deleted.

9 changes: 0 additions & 9 deletions docs/.eslintrc.js

This file was deleted.

24 changes: 0 additions & 24 deletions docs/index.html

This file was deleted.

43 changes: 0 additions & 43 deletions docs/package.json

This file was deleted.

0 comments on commit 4cc74da

Please sign in to comment.