Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade with-carbon-components to built-in SCSS #10321

Merged
merged 2 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 5 additions & 23 deletions examples/with-carbon-components/next.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
const withSass = require('@zeit/next-sass')
const withImages = require('next-images')

module.exports = withImages(
withSass({
webpack(config) {
config.module.rules.push({
test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
publicPath: './',
outputPath: 'static/',
name: '[name].[ext]',
},
},
})

return config
},
})
)
module.exports = {
experimental: {
scss: true,
},
}
2 changes: 0 additions & 2 deletions examples/with-carbon-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
},
"license": "ISC",
"dependencies": {
"@zeit/next-sass": "^1.0.1",
"carbon-components": "^9.6.4",
"carbon-components-react": "^6.19.1",
"carbon-icons": "^7.0.7",
"next": "latest",
"next-images": "^0.10.6",
"react": "^16.7.0",
"react-dom": "^16.7.0"
}
Expand Down
7 changes: 7 additions & 0 deletions examples/with-carbon-components/pages/_app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import '../styles/custom-theme.scss'

function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}

export default MyApp
17 changes: 0 additions & 17 deletions examples/with-carbon-components/pages/_document.js

This file was deleted.

2 changes: 0 additions & 2 deletions examples/with-carbon-components/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React, { Component, Fragment } from 'react'
import { Button } from 'carbon-components-react'

import '../static/myCustomTheme.scss'

export default class DemoApp extends Component {
render() {
return (
Expand Down
3 changes: 0 additions & 3 deletions examples/with-carbon-components/static/myCustomTheme.scss

This file was deleted.

2 changes: 2 additions & 0 deletions examples/with-carbon-components/styles/custom-theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import './export.scss';
@import '~carbon-components/scss/globals/scss/styles.scss';