Skip to content

Commit

Permalink
add css example
Browse files Browse the repository at this point in the history
  • Loading branch information
lucleray committed Nov 5, 2018
1 parent 659fab1 commit 6bfc9eb
Show file tree
Hide file tree
Showing 7 changed files with 4,555 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
node_modules
.next
5 changes: 5 additions & 0 deletions examples/css/next.config.js
@@ -0,0 +1,5 @@
// next.config.js
const withCss = require('@zeit/next-css')
const withPurgeCss = require('next-purgecss')

module.exports = withCss(withPurgeCss())
16 changes: 16 additions & 0 deletions examples/css/package.json
@@ -0,0 +1,16 @@
{
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^7.0.2",
"react": "^16.6.0",
"react-dom": "^16.6.0"
},
"devDependencies": {
"@zeit/next-css": "^1.0.1",
"next-purgecss": "^1.0.4"
}
}
3 changes: 3 additions & 0 deletions examples/css/pages/index.js
@@ -0,0 +1,3 @@
import '../style.css'

export default () => <div className="example">Hello World!</div>
9 changes: 9 additions & 0 deletions examples/css/readme.md
@@ -0,0 +1,9 @@
Basic example with :

- [next-css](https://github.com/zeit/next-plugins/tree/master/packages/next-css)
- [next-purgecss](https://github.com/lucleray/next-purgecss)

To start :

- `yarn install`
- `yarn dev`
7 changes: 7 additions & 0 deletions examples/css/style.css
@@ -0,0 +1,7 @@
.example {
font-size: 50px;
}

.unused-css-class {
color: red;
}

0 comments on commit 6bfc9eb

Please sign in to comment.