Skip to content

Commit

Permalink
chore(examples): update with-linaria (#41085)
Browse files Browse the repository at this point in the history
Lands #39289 with code suggestions to comply with our [example
guideliens](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

closes #39289

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: Patrik Szewczyk <patrik.szewczyk@gmail.com>
  • Loading branch information
balazsorban44 and ThePatriczek committed Oct 1, 2022
1 parent c70f951 commit 77577f7
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
5 changes: 5 additions & 0 deletions examples/cms-sitefinity/next-env.d.ts
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
7 changes: 5 additions & 2 deletions examples/with-linaria/.babelrc
@@ -1,3 +1,6 @@
{
"presets": ["next/babel", "linaria/babel"]
}
"presets": [
"next/babel",
"@linaria"
]
}
12 changes: 7 additions & 5 deletions examples/with-linaria/package.json
Expand Up @@ -6,13 +6,15 @@
"start": "next start"
},
"dependencies": {
"linaria": "^2.1.0",
"@linaria/core": "^4.1.2",
"@linaria/react": "^4.1.4",
"next": "latest",
"next-linaria": "^0.11.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"next-linaria": "^1.0.1-beta",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@babel/core": "^7.13.10"
"@linaria/babel-preset": "^4.2.1",
"@linaria/webpack-loader": "^4.1.4"
}
}
@@ -1,6 +1,6 @@
import Head from 'next/head'
import { styled } from 'linaria/react'
import { css } from 'linaria'
import { styled } from '@linaria/react'
import { css } from '@linaria/core'

const Box = styled.div`
margin-top: 40px;
Expand Down
20 changes: 20 additions & 0 deletions examples/with-linaria/tsconfig.json
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

0 comments on commit 77577f7

Please sign in to comment.