Skip to content

Commit

Permalink
Merge 480b6d4 into c2dc749
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs committed May 16, 2024
2 parents c2dc749 + 480b6d4 commit 6df79b3
Show file tree
Hide file tree
Showing 27 changed files with 1,028 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-timers-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@guardian/source-development-kitchen': minor
---

Create `@guardian/source-development-kitchen`
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,38 @@ install: check-node-version
@guardian/source\:verify-dist: env
@corepack pnpm --filter @guardian/source verify-dist

.PHONY: @guardian/source-development-kitchen\:build
@guardian/source-development-kitchen\:build: env
@corepack pnpm --filter @guardian/source-development-kitchen build

.PHONY: @guardian/source-development-kitchen\:build-storybook
@guardian/source-development-kitchen\:build-storybook: env
@corepack pnpm --filter @guardian/source-development-kitchen build-storybook

.PHONY: @guardian/source-development-kitchen\:dev
@guardian/source-development-kitchen\:dev: env
@corepack pnpm --filter @guardian/source-development-kitchen dev

.PHONY: @guardian/source-development-kitchen\:fix
@guardian/source-development-kitchen\:fix: env
@corepack pnpm --filter @guardian/source-development-kitchen fix

.PHONY: @guardian/source-development-kitchen\:lint
@guardian/source-development-kitchen\:lint: env
@corepack pnpm --filter @guardian/source-development-kitchen lint

.PHONY: @guardian/source-development-kitchen\:storybook
@guardian/source-development-kitchen\:storybook: env
@corepack pnpm --filter @guardian/source-development-kitchen storybook

.PHONY: @guardian/source-development-kitchen\:test
@guardian/source-development-kitchen\:test: env
@corepack pnpm --filter @guardian/source-development-kitchen test

.PHONY: @guardian/source-development-kitchen\:verify-dist
@guardian/source-development-kitchen\:verify-dist: env
@corepack pnpm --filter @guardian/source-development-kitchen verify-dist

.PHONY: @guardian/source-foundations\:build
@guardian/source-foundations\:build: env
@corepack pnpm --filter @guardian/source-foundations build
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The following packages live in `libs/@guardian/*` and are published to NPM:
- [@guardian/newsletter-types](libs/@guardian/newsletter-types)
- [@guardian/prettier](libs/@guardian/prettier)
- [@guardian/source](libs/@guardian/source)
- [@guardian/source-development-kitchen](libs/@guardian/source-development-kitchen)
- [@guardian/source-foundations](libs/@guardian/source-foundations)
- [@guardian/source-react-components](libs/@guardian/source-react-components)
- [@guardian/source-react-components-development-kitchen](libs/@guardian/source-react-components-development-kitchen)
Expand Down Expand Up @@ -199,6 +200,17 @@ Project-specific tasks are defined as `scripts` in a `package.json` or `targets`
- `make @guardian/source:test`
- `make @guardian/source:verify-dist`

#### @guardian/source-development-kitchen

- `make @guardian/source-development-kitchen:build`
- `make @guardian/source-development-kitchen:build-storybook`
- `make @guardian/source-development-kitchen:dev`
- `make @guardian/source-development-kitchen:fix`
- `make @guardian/source-development-kitchen:lint`
- `make @guardian/source-development-kitchen:storybook`
- `make @guardian/source-development-kitchen:test`
- `make @guardian/source-development-kitchen:verify-dist`

#### @guardian/source-foundations

- `make @guardian/source-foundations:build`
Expand Down
5 changes: 5 additions & 0 deletions apps/storybooks/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ module.exports = {
// port set in libs/@guardian/source/package.json
url: 'http://localhost:4404',
},
'source-development-kitchen': {
title: 'source-development-kitchen',
// port set in libs/@guardian/source-development-kitchen/package.json
url: 'http://localhost:4405',
},
};
},
};
45 changes: 45 additions & 0 deletions libs/@guardian/source-development-kitchen/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = {
extends: ['../../../.eslintrc.cjs'],
ignorePatterns: [
'!**/*',
'node_modules',
'jest.dist.*', // depends on build output, so don't lint it
'dist',
'storybook-static',
'.wireit',
],
overrides: [
{
files: ['*.ts', '*.tsx'],
parserOptions: {
tsconfigRootDir: __dirname,
},
rules: {},
},
{
files: ['*.js', '*.jsx'],
rules: {},
},
{
files: ['*.test.ts'],
rules: {
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
},
},
{
// these are only internal files, so we don't need to check them so
// rigorously they often use things like JSON which are `any`s too,
// we can be more lenient
files: ['scripts/**/*'],
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
},
},
],
};
22 changes: 22 additions & 0 deletions libs/@guardian/source-development-kitchen/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const rootMain = require('../../../../.storybook/main');

// To customise your Storybook config for this project, update this file

module.exports = {
...rootMain,

core: { ...rootMain.core },

stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [...rootMain.addons],
webpackFinal: async (config, { configType }) => {
// apply any global webpack configs that might have been specified in .storybook/main.js
if (rootMain.webpackFinal) {
config = await rootMain.webpackFinal(config, { configType });
}

// add your own webpack tweaks if needed

return config;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';
import { theme } from './theme';

addons.setConfig({
theme,
});

0 comments on commit 6df79b3

Please sign in to comment.