Skip to content

Commit

Permalink
Merge pull request #170 from reuters-graphics/yaks
Browse files Browse the repository at this point in the history
Yaks
  • Loading branch information
hobbes7878 authored Aug 28, 2024
2 parents 203b102 + cfb8f17 commit e424dd1
Show file tree
Hide file tree
Showing 225 changed files with 20,152 additions and 25,730 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": true,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/tidy-news-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@reuters-graphics/graphics-components': minor
---

Updates Storybook and makes Svelte 4 minimum.
5 changes: 0 additions & 5 deletions .devcontainer/devcontainer.json

This file was deleted.

52 changes: 0 additions & 52 deletions .eslintrc.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .github/COMMIT_ERROR_ISSUE_TEMPLATE.md

This file was deleted.

14 changes: 3 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
### What's in this pull request

- [ ] Bug fix
- [ ] New component/feature
- [ ] Documentation update
- [ ] Other

### Description

Tell us what this PR does or link to any related issues that describe the goal here.

### Before submitting, please check that you've
### Before submitting, please check that you've ...

- [ ] Read our [contributing guide](https://github.com/reuters-graphics/graphics-components/blob/master/CONTRIBUTING.md) at some point
- [ ] Formatted you code correctly (i.e., prettier cleaned it up)
- [x] Read our [contributing guide](https://github.com/reuters-graphics/graphics-components/blob/master/CONTRIBUTING.md)
- [ ] Documented any new components or features
- [ ] Tagged an editor to review
- [ ] Tagged an editor to review this PR
41 changes: 0 additions & 41 deletions .github/docs.yaml

This file was deleted.

14 changes: 11 additions & 3 deletions .github/workflows/chromatic.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Chromatic

on: push
on:
pull_request:
branches:
- main

jobs:
chromatic-deployment:
Expand All @@ -9,11 +12,16 @@ jobs:
NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: yarn
run: npm ci
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint

on:
pull_request:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
checks: write
contents: write

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- id: setup-node
name: Setup Node.JS
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- id: install-deps
name: Install dependencies
run: npm ci

- id: lint
name: Lint code
run: npm run lint:check

- id: format
name: Format code
run: npm run format:check

- id: check-deps
name: Check for unused scripts and dependencies
run: npm run knip
103 changes: 37 additions & 66 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,100 +2,71 @@ name: Release

on:
push:
pull_request:
workflow_dispatch:
branches:
- main

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v3
concurrency: ${{ github.workflow }}-${{ github.ref }}

- id: setup-node
name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'

- id: cache
name: Cache node modules
uses: actions/cache@v3
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}
- id: install-deps
name: Install dependencies
run: yarn install --frozen-lockfile

- id: lint
name: Lint code
run: yarn run eslint --fix --ext .ts,.js,.svelte src/components
permissions:
contents: write
pull-requests: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
env:
NODE_OPTIONS: '--max_old_space_size=4096'
# Restricts release to:
# 1) pushes of release tags
# 2) the default branch
# 3) the base repository
if: |
github.event_name == 'push' && startsWith(github.ref, 'refs/tags') &&
endsWith(github.event.base_ref, github.event.repository.default_branch) &&
github.repository == 'reuters-graphics/graphics-components'
if: github.repository == 'reuters-graphics/graphics-components'
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.repository.default_branch }}

- id: setup-node
name: Setup Node.JS
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org
scope: '@reuters-graphics'
node-version: 20
cache: npm

- id: install-deps
name: Install dependencies
run: yarn install --frozen-lockfile
run: npm ci

- id: build-docs
name: Build docs
run: npm run build:docs
- id: lint
name: Lint code
run: npm run lint:check

- id: build-package
name: Build package
run: npm run build:package

- id: version
name: Version
run: npm version ${{ github.ref_name }} --no-git-tag-version

- id: publish
name: Publish
run: npm publish --access public
- id: changesets
name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
version: npm run changeset:version
publish: npm run changeset:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- id: commit
name: Commit
- id: build-docs
name: Build docs
if: steps.changesets.outputs.published == 'true'
run: npm run build:docs

- id: commit_and_push
name: Commit and push docs
if: steps.changesets.outputs.published == 'true'
run: |
git config --global user.name github-actions
git config --global user.email github-actions@github.com
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "published ${{ github.ref_name }}"
git commit -m "docs"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 0 additions & 5 deletions .markdownlint.jsonc

This file was deleted.

4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
docs
dist
node_modules
!src/docs/
Loading

0 comments on commit e424dd1

Please sign in to comment.