Skip to content

Commit

Permalink
Merge pull request #74 from guardian/gh-external-src-deps
Browse files Browse the repository at this point in the history
Move src-* dependencies into peerDependencies
  • Loading branch information
GHaberis authored Apr 8, 2020
2 parents f84e951 + fb7fec1 commit f020033
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 31 deletions.
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@guardian/consent-management-platform",
"version": "2.0.10",
"version": "3.0.0",
"description": "Library of useful utilities for managing consent state across *.theguardian.com",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -29,15 +29,15 @@
],
"license": "Apache-2.0",
"dependencies": {
"@guardian/src-button": "^0.13.0",
"@guardian/src-foundations": "^0.13.0",
"@guardian/src-svgs": "^0.13.0",
"consent-string": "^1.5.1",
"js-cookie": "^2.2.1",
"whatwg-fetch": "^3.0.0"
},
"peerDependencies": {
"@emotion/core": "^10.0.21",
"@guardian/src-button": "^0.16.1",
"@guardian/src-foundations": "^0.16.1",
"@guardian/src-svgs": "0.16.1",
"emotion-theming": "^10.0.27",
"react": "^16.10.2"
},
Expand All @@ -49,6 +49,9 @@
"@babel/preset-typescript": "^7.6.0",
"@emotion/babel-preset-css-prop": "^10.0.17",
"@emotion/core": "^10.0.21",
"@guardian/src-button": "^0.16.1",
"@guardian/src-foundations": "^0.16.1",
"@guardian/src-svgs": "0.16.1",
"@types/jest": "^24.0.16",
"@types/js-cookie": "^2.2.2",
"@types/react": "^16.9.9",
Expand Down
8 changes: 7 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ module.exports = {
format: 'cjs',
},
],
external: ['react', '@emotion/core'],
external: [
'react',
'@emotion/core',
'@guardian/src-button',
'@guardian/src-foundations',
'@guardian/src-svgs',
],
plugins: [babel({ extensions }), resolve({ extensions }), commonjs()],
};
4 changes: 2 additions & 2 deletions src/component/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ const contentContainerStyles = (bodySerif: string) => css`
`;

const headlineStyles = (headlineSerif: string) => css`
font-size: ${headlineSizes.small}rem;
font-size: ${headlineSizes.small}px;
font-weight: 700;
line-height: 1.5;
${from.leftCol} {
font-size: ${headlineSizes.medium}rem;
font-size: ${headlineSizes.medium}px;
}
font-family: ${headlineSerif};
Expand Down
2 changes: 1 addition & 1 deletion src/component/CmpCollapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const panelStyles = (collapsed: boolean, bodySans: string) => css`
p {
font-family: ${bodySans};
font-size: ${bodySizes.medium}rem;
font-size: ${bodySizes.medium}px;
line-height: 1.5rem;
margin-bottom: 8px;
}
Expand Down
4 changes: 2 additions & 2 deletions src/component/CollapseItemButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const collapseItemButtonStyles = (collapsed: boolean, bodySans: string) => css`
pointer-events: none;
}
font-family: ${bodySans};
font-size: ${headlineSizes.xxxsmall}rem;
font-size: ${headlineSizes.xxxsmall}px;
${from.mobileLandscape} {
font-size: ${headlineSizes.xxsmall}rem;
font-size: ${headlineSizes.xxsmall}px;
}
line-height: 1.15rem;
font-weight: 700;
Expand Down
10 changes: 5 additions & 5 deletions src/component/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ const headerStyles = css`

const primaryHeadlineStyles = (headlineSerif: string) => css`
font-family: ${headlineSerif};
font-size: ${headlineSizes.xsmall}rem;
font-size: ${headlineSizes.xsmall}px;
font-weight: 700;
line-height: 1.5;
${from.leftCol} {
font-size: ${headlineSizes.small}rem;
font-size: ${headlineSizes.small}px;
}
`;

Expand All @@ -90,11 +90,11 @@ const copyContainerStyles = (headlineSerif: string) => css`
font-family: ${headlineSerif};
h2 {
font-size: ${headlineSizes.xxxsmall}rem;
font-size: ${headlineSizes.xxxsmall}px;
line-height: 1.35rem;
${from.phablet} {
font-size: ${headlineSizes.xxsmall}rem;
font-size: ${headlineSizes.xxsmall}px;
}
}
`;
Expand Down Expand Up @@ -132,7 +132,7 @@ const buttonContainerStyles = (bodySerif: string) => css`
p {
font-family: ${bodySerif};
font-size: ${bodySizes.small}rem;
font-size: ${bodySizes.small}px;
line-height: 1.35rem;
font-weight: 700;
margin-bottom: 8px;
Expand Down
40 changes: 24 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -931,22 +931,30 @@
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46"
integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==

"@guardian/src-button@^0.13.0":
version "0.13.0"
resolved "https://registry.yarnpkg.com/@guardian/src-button/-/src-button-0.13.0.tgz#0071e83dff911d43a700fbaaa659ed741bdd486d"
integrity sha512-ykKQ1IgU6fWvysmCmj3HWVYql0Hc/WuzYGZMh7EDDAB39YEfbH54ZMjYM3+SNkqoa0yNqRRhivCFpMyPm3mjpA==
dependencies:
"@guardian/src-svgs" "^0.13.0"

"@guardian/src-foundations@^0.13.0":
version "0.13.0"
resolved "https://registry.yarnpkg.com/@guardian/src-foundations/-/src-foundations-0.13.0.tgz#8bfed9b94e2e4f24ecacb754bbe573b6e0cfe088"
integrity sha512-8lTZSo49W1lPhBFaaLrg2Eo2jrwUB3VGw6a7ZRI7oBEyTglmlbjFDiciu2Di6WSrzuSWiI+9OJTSSjCP6lTT2A==

"@guardian/src-svgs@^0.13.0":
version "0.13.0"
resolved "https://registry.yarnpkg.com/@guardian/src-svgs/-/src-svgs-0.13.0.tgz#97d893a6e33feb255666fef6779ffe18a7c4e2f5"
integrity sha512-cDIGNOaatYVDk+eWCv2cAdBlXZ2ECDxOcc897GowJYCHmy+HifL0AvzHlHRLKYRQXzVcaPfoXDOjVonA4ViHqw==
"@guardian/src-button@^0.16.1":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@guardian/src-button/-/src-button-0.16.1.tgz#f8833c8906f00a9f36295901282529220452d647"
integrity sha512-2wRywzccYNDG7WmVOL/ISQ0zoDCFbgHKrAMtBVx8C09kHRxcYRj4zvH20+psvL5u8ZrLYFB3Pm+GwX9Y8VgndQ==
dependencies:
"@guardian/src-helpers" "^0.16.1"
"@guardian/src-svgs" "^0.16.1"

"@guardian/src-foundations@^0.16.1":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@guardian/src-foundations/-/src-foundations-0.16.1.tgz#d5e52a57012c588d146b05ded7f9fbc4a9af40d5"
integrity sha512-E6YDqq53gy5CoO8xFPWDBjiYiI0o+4BE1/mFcwkpWGwtpkSnxi21LhkaQ63r+KRxoDB29clc86ChbNHXw9keFA==

"@guardian/src-helpers@^0.16.1":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@guardian/src-helpers/-/src-helpers-0.16.1.tgz#cf1e5e6a2c36bb1d91c9785cbfe7f48b735644aa"
integrity sha512-SYWrWK5tm+axqRFRY9QjfFt/CS8v1ROh6o1/oy8hQxgiJExXsgLkbv0R8lgKkZaC8luO1dEgQYYXgQiqM+dsIA==
dependencies:
"@guardian/src-foundations" "^0.16.1"

"@guardian/[email protected]", "@guardian/src-svgs@^0.16.1":
version "0.16.1"
resolved "https://registry.yarnpkg.com/@guardian/src-svgs/-/src-svgs-0.16.1.tgz#331d6bb30513c45b09e5b4807832eb4a146a27ea"
integrity sha512-OudfWJaKpTTP0J1QckqX0NmfneXgQ5YieZ/4em2lNXGZFEfYyxHnIXrAQE5LjmIGR8eJQoIikkwWiAFt4ziHXQ==

"@jest/console@^24.7.1":
version "24.7.1"
Expand Down

0 comments on commit f020033

Please sign in to comment.