1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

remove glamorous example since its no longer maintained (#5738)

Since glamorous is [no longer maintained](https://github.com/paypal/glamorous#status-unmaintained) removing it from readme.
This commit is contained in:
Hozefa 2018-11-23 12:18:13 -08:00 committed by Tim Neutkens
parent 7076727d3e
commit 401594ed36
2 changed files with 11 additions and 10 deletions

View file

@ -4,6 +4,8 @@
## How to use
> Glamorous is no longer maintained. Choose styled-components or emotion instead
### Using `create-next-app`
Execute [`create-next-app`](https://github.com/segmentio/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:

View file

@ -190,7 +190,6 @@ Please see the [styled-jsx documentation](https://www.npmjs.com/package/styled-j
<li><a href="/examples/with-styled-components">Styled components</a></li>
<li><a href="/examples/with-styletron">Styletron</a></li>
<li><a href="/examples/with-glamor">Glamor</a></li>
<li><a href="/examples/with-glamorous">Glamorous</a></li>
<li><a href="/examples/with-cxs">Cxs</a></li>
<li><a href="/examples/with-aphrodite">Aphrodite</a></li>
<li><a href="/examples/with-fela">Fela</a></li>
@ -776,16 +775,16 @@ class MyLink extends React.Component {
const { router } = this.props
router.prefetch('/dynamic')
}
render() {
const { router } = this.props
return (
<div>
<a onClick={() => setTimeout(() => router.push('/dynamic'), 100)}>
A route transition will happen after 100ms
</a>
</div>
</div>
)
}
}
@ -1088,7 +1087,7 @@ export default class MyApp extends App {
- Is rendered on the server side
- Is used to change the initial server side rendered document markup
- Commonly used to implement server side rendering for css-in-js libraries like [styled-components](/examples/with-styled-components), [glamorous](/examples/with-glamorous) or [emotion](/examples/with-emotion). [styled-jsx](https://github.com/zeit/styled-jsx) is included with Next.js by default.
- Commonly used to implement server side rendering for css-in-js libraries like [styled-components](/examples/with-styled-components) or [emotion](/examples/with-emotion). [styled-jsx](https://github.com/zeit/styled-jsx) is included with Next.js by default.
Pages in `Next.js` skip the definition of the surrounding document's markup. For example, you never include `<html>`, `<body>`, etc. To override that default behavior, you must create a file at `./pages/_document.js`, where you can extend the `Document` class:
@ -1360,11 +1359,11 @@ The second argument to `webpack` is an object containing properties useful when
- `babel` - `Object` the `babel-loader` configuration for Next.js.
- `hotSelfAccept` - `Object` the `hot-self-accept-loader` configuration. This loader should only be used for advanced use cases. For example [`@zeit/next-typescript`](https://github.com/zeit/next-plugins/tree/master/packages/next-typescript) adds it for top-level typescript pages.
Example usage of `defaultLoaders.babel`:
Example usage of `defaultLoaders.babel`:
```js
// Example next.config.js for adding a loader that depends on babel-loader
// This source was taken from the @zeit/next-mdx plugin source:
// This source was taken from the @zeit/next-mdx plugin source:
// https://github.com/zeit/next-plugins/blob/master/packages/next-mdx
module.exports = {
webpack: (config, {}) => {
@ -1529,7 +1528,7 @@ Note: we recommend putting `.next`, or your [custom dist folder](https://github.
## Browser support
Next.js supports IE11 and all modern browsers out of the box using [`@babel/preset-env`](https://new.babeljs.io/docs/en/next/babel-preset-env.html). In order to support IE11 Next.js adds a global `Promise` polyfill. In cases where your own code or any external NPM dependencies you are using requires features not supported by your target browsers you will need to implement polyfills.
Next.js supports IE11 and all modern browsers out of the box using [`@babel/preset-env`](https://new.babeljs.io/docs/en/next/babel-preset-env.html). In order to support IE11 Next.js adds a global `Promise` polyfill. In cases where your own code or any external NPM dependencies you are using requires features not supported by your target browsers you will need to implement polyfills.
The [polyfills](https://github.com/zeit/next.js/tree/canary/examples/with-polyfills) example demonstrates the recommended approach to implement polyfills.
@ -1564,7 +1563,7 @@ next build
next export
```
By default `next export` doesn't require any configuration. It will generate a default `exportPathMap` containing the routes to pages inside the `pages` directory. This default mapping is available as `defaultPathMap` in the example below.
By default `next export` doesn't require any configuration. It will generate a default `exportPathMap` containing the routes to pages inside the `pages` directory. This default mapping is available as `defaultPathMap` in the example below.
If your application has dynamic routes you can add a dynamic `exportPathMap` in `next.config.js`.
This function is asynchronous and gets the default `exportPathMap` as a parameter.
@ -1626,7 +1625,7 @@ now
### Copying custom files
In case you have to copy custom files like a robots.txt or generate a sitemap.xml you can do this inside of `exportPathMap`.
`exportPathMap` gets a few contextual parameter to aid you with creating/copying files:
`exportPathMap` gets a few contextual parameter to aid you with creating/copying files:
- `dev` - `true` when `exportPathMap` is being called in development. `false` when running `next export`. In development `exportPathMap` is used to define routes and behavior like copying files is not required.
- `dir` - Absolute path to the project directory