Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Merge branch 'main' into sa-responsive-column-width
Browse files Browse the repository at this point in the history
  • Loading branch information
SiAdcock authored Feb 24, 2021
2 parents 09cda83 + de59114 commit b597775
Show file tree
Hide file tree
Showing 163 changed files with 759 additions and 1,616 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"prettier/prettier": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-unused-vars": "off",
"jsx-a11y/label-has-for": "off"
"jsx-a11y/label-has-for": "off",
"react/react-in-jsx-scope": "off"
},
"parserOptions": {
"ecmaFeatures": {
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"workspaces": [
"src/core/*",
"src/core/components/*",
"src/editorial/web/*",
"src/editorial/web",
"src/editorial/web/components/*"
],
"scripts": {
Expand All @@ -23,9 +23,9 @@
"release:major:all": "yarn build:all && yarn validate && yarn verbump:major:all && yarn publish:release",
"release:minor:all": "yarn build:all && yarn validate && yarn verbump:minor:all && yarn publish:release",
"release:patch:all": "yarn build:all && yarn validate && yarn verbump:patch:all && yarn publish:release",
"release:prerelease-bump:all": "yarn build:all && yarn validate && yarn verbump:prerelease:all && yarn publish:release",
"release:prerelease:all": "yarn build:all && yarn validate && yarn publish:release",
"storybook": "yarn watch:foundations & yarn watch:icons & start-storybook",
"release:prerelease-bump:all": "yarn validate && yarn verbump:prerelease:all && yarn publish:release",
"release:prerelease:all": "yarn validate && yarn publish:release",
"storybook": "start-storybook",
"tag:beta:all": "ts-node ./scripts/tag-beta-all",
"test": "jest",
"tsc": "tsc",
Expand Down
6 changes: 5 additions & 1 deletion scripts/build-all.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/* eslint-disable @typescript-eslint/no-var-requires */

import execa, { ExecaReturnValue } from 'execa';
import { paths, getComponentPaths } from './paths';

const build = (dir: string) => {
return execa('yarn', ['--cwd', `${dir}`, 'run', 'build'], {
console.log(`\nBuilding ${require(`${dir}/package.json`).name}`);

return execa('yarn', ['--cwd', dir, 'run', 'build'], {
stdio: 'inherit',
});
};
Expand Down
7 changes: 0 additions & 7 deletions src/core/brand/.babelrc.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/core/brand/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions src/core/brand/guardian-live-logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export const SvgGuardianLiveLogo = () => {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 200">
Expand Down
2 changes: 0 additions & 2 deletions src/core/brand/guardian-logo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export const SvgGuardianLogo = () => {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 100">
Expand Down
36 changes: 13 additions & 23 deletions src/core/brand/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@
"url": "https://github.com/guardian/source.git"
},
"license": "Apache-2.0",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"files": [
"guardian-logo.tsx",
"guardian-live-logo.tsx",
"roundel.tsx",
"roundel-brand.tsx",
"roundel-brand-inverse.tsx",
"roundel-default.tsx",
"roundel-inverse.tsx",
"*.d.ts",
"dist/*.js"
"dist/esm",
"dist/cjs",
"dist/types"
],
"scripts": {
"build": "yarn clean && tsc && rollup --config",
"clean": "rm -rf dist *.d.ts",
"build": "npm-run-all clean --parallel build:*",
"build:cjs": "tsc --composite false --declaration false --emitDeclarationOnly false --outDir dist/cjs --module commonjs",
"build:esm": "tsc --composite false --declaration false --emitDeclarationOnly false --outDir dist/esm --module ES6",
"build:types": "tsc -b",
"clean": "rm -rf dist",
"prepublish": "yarn build",
"publish:public": "yarn publish --access public",
"verbump:major": "yarn version --major --no-git-tag-version",
Expand All @@ -33,19 +31,11 @@
"watch": "rollup --config --watch"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.10.0",
"@babel/preset-react": "^7.10.0",
"@babel/preset-typescript": "^7.9.0",
"@emotion/react": "^11.1.2",
"@guardian/src-foundations": "^3.3.0-rc.0",
"@guardian/src-helpers": "^3.3.0-rc.0",
"rollup": "^1.17.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-node-resolve": "^5.2.0",
"npm-run-all": "^4.1.5",
"typescript": "^4.1.3"
},
"peerDependencies": {
"@emotion/react": "^11.1.2",
"@guardian/src-foundations": "^3.3.0-rc.0",
"react": "^17.0.1"
}
Expand Down
26 changes: 0 additions & 26 deletions src/core/brand/rollup.config.js

This file was deleted.

1 change: 0 additions & 1 deletion src/core/brand/roundel-brand-inverse.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { SvgRoundelFilled } from './roundel-filled';
import { brand } from '@guardian/src-foundations/palette';

Expand Down
1 change: 0 additions & 1 deletion src/core/brand/roundel-brand.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { SvgRoundelFilled } from './roundel-filled';
import { brand } from '@guardian/src-foundations/palette';

Expand Down
1 change: 0 additions & 1 deletion src/core/brand/roundel-default.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { SvgRoundelFilled } from './roundel-filled';
import { neutral } from '@guardian/src-foundations/palette';

Expand Down
2 changes: 0 additions & 2 deletions src/core/brand/roundel-filled.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

export const SvgRoundelFilled = ({
background,
text,
Expand Down
1 change: 0 additions & 1 deletion src/core/brand/roundel-inverse.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { SvgRoundelFilled } from './roundel-filled';
import { neutral } from '@guardian/src-foundations/palette';

Expand Down
2 changes: 0 additions & 2 deletions src/core/brand/roundel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

// TODO: Deprecated. Please only use filled versions
export const SvgRoundel = () => {
return (
Expand Down
17 changes: 10 additions & 7 deletions src/core/brand/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": ".",
"outDir": "dist/types",
"declaration": true,
"emitDeclarationOnly": true,
"jsx": "preserve",
"esModuleInterop": true,
"lib": ["es5", "es6", "es7", "es2017", "es2019", "dom"],
"types": ["@emotion/react/types/css-prop"]
"emitDeclarationOnly": true
},
"exclude": ["node_modules"]
"include": ["."],
"exclude": ["dist", "stories.tsx", "stories"],
"references": [
{
"path": "../foundations"
}
]
}
8 changes: 0 additions & 8 deletions src/core/components/accordion/.babelrc.js

This file was deleted.

1 change: 0 additions & 1 deletion src/core/components/accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
///<reference types="@emotion/react/types/css-prop" />
import React, { useState, useEffect, ReactElement, ReactNode } from 'react';
import {
accordion,
Expand Down
31 changes: 13 additions & 18 deletions src/core/components/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@
"url": "https://github.com/guardian/source.git"
},
"license": "Apache-2.0",
"main": "dist/accordion.js",
"module": "dist/accordion.esm.js",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types/index.d.ts",
"files": [
"dist/*.js",
"index.tsx",
"styles.ts",
"emotion.d.ts"
"dist/esm",
"dist/cjs",
"dist/types"
],
"scripts": {
"build": "yarn clean && rollup --config",
"build": "npm-run-all clean --parallel build:*",
"build:cjs": "tsc --composite false --declaration false --emitDeclarationOnly false --outDir dist/cjs --module commonjs",
"build:esm": "tsc --composite false --declaration false --emitDeclarationOnly false --outDir dist/esm --module ES6",
"build:types": "tsc -b",
"clean": "rm -rf dist",
"prepublish": "yarn build",
"publish:public": "yarn publish --access public",
Expand All @@ -30,21 +33,13 @@
"@guardian/src-helpers": "^3.3.0-rc.0"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.10.0",
"@babel/preset-react": "^7.10.0",
"@babel/preset-typescript": "^7.9.0",
"@emotion/babel-preset-css-prop": "^11.0.0",
"@guardian/src-foundations": "^3.3.0-rc.0",
"@guardian/src-link": "^3.3.0-rc.0",
"rollup": "^1.17.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-node-resolve": "^5.2.0"
"npm-run-all": "^4.1.5",
"typescript": "^4.1.3"
},
"peerDependencies": {
"@emotion/react": "^11.1.2",
"@guardian/src-foundations": "^3.3.0-rc.0",
"@guardian/src-icons": "^3.3.0-rc.0",
"react": "^17.0.1"
}
}
32 changes: 0 additions & 32 deletions src/core/components/accordion/rollup.config.js

This file was deleted.

18 changes: 18 additions & 0 deletions src/core/components/accordion/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "../../../../tsconfig.json",
"compilerOptions": {
"outDir": "dist/types",
"declaration": true,
"emitDeclarationOnly": true
},
"include": [".", "../../foundations/types/themes.d.ts"],
"exclude": ["dist", "stories.tsx", "stories/**/*"],
"references": [
{
"path": "../../foundations"
},
{
"path": "../../icons"
}
]
}
8 changes: 0 additions & 8 deletions src/core/components/button/.babelrc.js

This file was deleted.

Loading

0 comments on commit b597775

Please sign in to comment.