Skip to content

Commit

Permalink
feat: Move stylesheet.css to dist folder
Browse files Browse the repository at this point in the history
 BREAKING CHANGE: Moved the `stylesheet.css` file to the `dist` folder, in order to group the style files.

You must change your import:
`import 'cozy-ui/transpiled/react/stylesheet.css'`
by:
`import 'cozy-ui/dist/stylesheet.css'`
  • Loading branch information
Merkur39 committed Aug 8, 2023
1 parent 0cf5f39 commit 0f1b63f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bundlemonrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"maxPercentIncrease": 10
},
{
"path": "transpiled/react/stylesheet.css",
"path": "dist/stylesheet.css",
"maxPercentIncrease": 10
}
],
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
- name: 'Build docs'
stage: 'docs'
script:
- yarn build
- yarn build:css:all
- yarn build:doc:react
- yarn build:doc:kss
workspaces:
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const plugins = [
{
extensions: ['.styl'],
preprocessCss: './preprocess',
extractCss: './transpiled/react/stylesheet.css',
extractCss: './dist/stylesheet.css',
generateScopedName: '[name]__[local]___[hash:base64:5]'
}
],
Expand Down
2 changes: 1 addition & 1 deletion docs/styleguide.setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '!!style-loader!css-loader!../transpiled/react/stylesheet.css'
import '!!style-loader!css-loader!../dist/stylesheet.css'
import '!!style-loader!css-loader!../dist/cozy-ui.utils.min.css'

window.SHOW_DEPRECATION_WARNINGS = true
2 changes: 1 addition & 1 deletion examples/parcel-app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
NavIcon,
genNavLink
} from '../../transpiled/react'
import '../../transpiled/react/stylesheet.css'
import '../../dist/stylesheet.css'

const RRNavLink = props => <div {...props} />

Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
NavIcon,
genNavLink
} from '../../transpiled/react'
import '../../transpiled/react/stylesheet.css'
import '../../dist/stylesheet.css'

const RRNavLink = props => <div {...props} />

Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
NavIcon,
genNavLink
} from '../../transpiled/react'
import '../../transpiled/react/stylesheet.css'
import '../../dist/stylesheet.css'

const RRNavLink = props => <div {...props} />

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"test:snapshots": "jest react/examples.spec.jsx",
"test:update:snapshots": "jest react/examples.spec.jsx -u",
"screenshots:server": "nodemon ./scripts/pixelmatch-server/server.js -e js,hbs",
"postbuild": "postcss transpiled/react/stylesheet.css --replace",
"postbuild": "postcss dist/stylesheet.css --replace",
"travis-deploy-once": "travis-deploy-once",
"start:css": "yarn build:css --watch",
"prestart:doc": "yarn sprite",
Expand Down

0 comments on commit 0f1b63f

Please sign in to comment.