Skip to content

Commit

Permalink
Switch to yarn pnp (#651)
Browse files Browse the repository at this point in the history
* prepared yarn 4 pipeline

* yarn 4 with corepack

* renamed jobs and removed push-trigger

* removed unused yml files

* updated read.me
  • Loading branch information
ChristianHoffmannS2 authored Nov 27, 2023
1 parent fb9537e commit 8f84ac3
Show file tree
Hide file tree
Showing 15 changed files with 21,010 additions and 168 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/build-design-tokens.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/commitlint.yml

This file was deleted.

22 changes: 10 additions & 12 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Compile

on: [push, pull_request]
on: [pull_request]

jobs:
snapshot-test:
compile:
runs-on: ubuntu-latest

steps:
Expand All @@ -20,19 +20,17 @@ jobs:
run: |
echo "::set-output name=version::$(node -v)"
- name: Get node_modules cache
uses: actions/[email protected]
id: node_modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ steps.node.outputs.version }}
- name: Enable Corepack
run: corepack enable

- name: Install yarn 4
run: yarn set version 4.x

- name: Install modules
run: npm ci
run: yarn

- name: Generate tokens
run: npm run tokens:generate
run: yarn tokens:generate

- name: Run Compile
run: npm run compile
run: yarn compile
18 changes: 8 additions & 10 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: eslint

on: [push, pull_request]
on: [pull_request]

jobs:
eslint:
Expand All @@ -20,16 +20,14 @@ jobs:
run: |
echo "::set-output name=version::$(node -v)"
- name: Get node_modules cache
uses: actions/[email protected]
id: node_modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ steps.node.outputs.version }}
- name: Enable Corepack
run: corepack enable

- name: Install yarn 4
run: yarn set version 4.x

- name: Install modules
run: npm ci
run: yarn

- name: Run ESLint
run: npm run lint
run: yarn lint
22 changes: 10 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test

on: [push, pull_request]
on: [pull_request]

jobs:
snapshot-test:
unit-test:
runs-on: ubuntu-latest

steps:
Expand All @@ -20,19 +20,17 @@ jobs:
run: |
echo "::set-output name=version::$(node -v)"
- name: Get node_modules cache
uses: actions/[email protected]
id: node_modules
with:
path: |
**/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}-${{ steps.node.outputs.version }}
- name: Enable Corepack
run: corepack enable

- name: Install yarn 4
run: yarn set version 4.x

- name: Install modules
run: npm ci
run: yarn

- name: Generate tokens
run: npm run tokens:generate
run: yarn tokens:generate

- name: Run Tests
run: npm run test
run: yarn test
Binary file added .yarn/install-state.gz
Binary file not shown.
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.2.cjs
48 changes: 32 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,31 @@ Please welcome your user and give a short introduction of your project.

# Quick Start

This section is meant to enable people to start the project locally in the most quick and easy way possible without needing to go through the whole Contribute Page.
Consider using Code Snippets and Screenshots as well as a links to different documentation chapters like the Contribute page to give access to further information. Also think about the most common problems and provide solutions. Please add a short introduction here.
This section is meant to enable people to start the project locally in the most quick and easy way possible without
needing to go through the whole Contribute Page. Consider using Code Snippets and Screenshots as well as a links to
different documentation chapters like the Contribute page to give access to further information. Also think about the
most common problems and provide solutions. Please add a short introduction here.

## Requirements

Please list all the requirements the user has to fullfill to be able to run your code.
Consider adding links to other tech documentations of possible dependencies to help users meet the requirements.We've added two examples of how you could structure this section:
Please list all the requirements the user has to fullfill to be able to run your code. Consider adding links to other
tech documentations of possible dependencies to help users meet the requirements.We've added two examples of how you
could structure this section:

1. This setup is working for all operating system, testing on Windows 8, Windows 8.1, Windows 10, Mac and Linux.
This project is a Node.js package. You need Node Version 4 or higher and npm Version 2 or higher, check your installed version with node -v and npm -v.
1. This setup is working for all operating system, testing on Windows 8, Windows 8.1, Windows 10, Mac and Linux. This
project is a Node.js package. You need Node Version 4 or higher and npm Version 2 or higher, check your installed
version with node -v and npm -v.

2. To run our code you have to meet the following requirements:

- Node.js v16.17.X <br>
(for more information check out the [Node.js Documentation](https://nodejs.org/en/docs/))
- ...
- Node.js v18 <br> (for more information check out the [Node.js Documentation](https://nodejs.org/en/docs/))

- yarn (any version, we will pick the right settings later)

## How to start

In this section you're supposed to provide the user with a step by step guide on how to install and use your project. We've added an example below to give you an idea of how you could structure your guide.
In this section you're supposed to provide the user with a step by step guide on how to install and use your project.
We've added an example below to give you an idea of how you could structure your guide.

1. First, create a folder and a package.json file

Expand All @@ -47,24 +52,32 @@ In this section you're supposed to provide the user with a step by step guide on
$ npm init -y
```

2. Next, install the app and save it as dependency
1. now we enable corepack for yarn and chooose right version

```sh
$ corepack enable
$ yarn set version 4.x
```

1. Next, install the app

```sh
$ npm install --save app-name
$ yarn
```

3. Now start up your app
1. Now start up your app

```sh
$ npm start
$ yarn start
```

</details>
<br>

## How to test

Please provide a short explanation on how and where to run your tests. You can also add a link to the Testing page to give further information. Also check out the following example to see one possibility to structure this section.
Please provide a short explanation on how and where to run your tests. You can also add a link to the Testing page to
give further information. Also check out the following example to see one possibility to structure this section.

Example:

Expand All @@ -88,4 +101,7 @@ This project is licensed under the [MIT license](./LICENSE.md).

# How to continue

In this section you're free to provide the user with any kind of link or information you think is helpful to them when they arrive at your project - just keep in mind to use neutral and unbiased language through out your documentation to make everyone feel welcome at your project. If you need further tips and tricks on how to write documentation, check out our Best Practices Page.
In this section you're free to provide the user with any kind of link or information you think is helpful to them when
they arrive at your project - just keep in mind to use neutral and unbiased language through out your documentation to
make everyone feel welcome at your project. If you need further tips and tricks on how to write documentation, check out
our Best Practices Page.
4 changes: 4 additions & 0 deletions benchmark.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

npm i 33.90s user 19.60s system 54% cpu 1:38.07 total

yarn 12.68s user 16.78s system 35% cpu 1:22.19 total
55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@
"main": "",
"types": "",
"scripts": {
"prestart": "npm run tokens:generate",
"start": "npm run start:storybook --workspace=@boiler/ui-library",
"build:storybook": "npm run build:storybook --workspace=@boiler/ui-library",
"react-example:dev": "npm run dev --workspace=@boiler/react-example-app",
"copy:static": "mkdir -p dist/assets && cp -rip static/{fonts,imgs}/* dist/assets/",
"build": "npm run build --workspace=@boiler/ui-library && npm run compile --workspace=@boiler/ui-library",
"build:types": "npm run build:types --workspace=@boiler/ui-library",
"lint": "npm run lint --workspace=@boiler/ui-library",
"format": "npm run format:eslint --workspace=@boiler/ui-library && npm run format:prettier --workspace=@boiler/ui-library",
"test": "npm run test --workspace=@boiler/ui-library",
"test:a11y": "npm run test:a11y --workspace=@boiler/storybook",
"start": "yarn tokens:generate && yarn workspace @boiler/ui-library start:storybook",
"build:storybook": "yarn workspace @boiler/ui-library build:storybook",
"react-example:dev": "yarn workspace @boiler/react-example-app dev",
"build": "yarn workspace @boiler/ui-library build && yarn workspace @boiler/ui-library compile",
"build:types": "yarn workspace @boiler/ui-library build:types",
"lint": "yarn workspace @boiler/ui-library lint",
"format": "yarn workspace @boiler/ui-library format:eslint && yarn workspace @boiler/ui-library format:prettier",
"test": "yarn workspace @boiler/ui-library test",
"test:a11y": "yarn workspace @boiler/storybook test:a11y",
"doc:install": "deven-documentation-skeleton install",
"doc:check": "deven-documentation-skeleton check",
"doc:update": "deven-documentation-skeleton update",
"compile:icons": "npm run compile:icons --workspace=@boiler/icons",
"compile": "npm run compile --workspace=@boiler/ui-library",
"tokens:generate": "npm run tokens:generate --workspace=@boiler/figma-design-tokens",
"compile:icons": "yarn workspace @boiler/icons compile:icons",
"compile": "yarn workspace @boiler/ui-library compile",
"tokens:generate": "yarn workspace @boiler/figma-design-tokens tokens:generate",
"prepare": "husky install"
},
"repository": {
"type": "git",
"url": "git+https://github.com/deven-org/BO1LER-Kitchen.git"
},
"private": true,
"workspaces": [
"packages/*"
],
Expand All @@ -40,14 +39,23 @@
"devDependencies": {
"@babel/core": "^7.23.0",
"@babel/plugin-proposal-decorators": "^7.23.0",
"@babel/preset-env": "^7.23.0",
"@babel/plugin-transform-class-properties": "^7.23.0",
"@babel/preset-env": "^7.23.0",
"@babel/preset-typescript": "^7.23.0",
"@boiler/figma-design-tokens": "0.0.1",
"@boiler/react-example-app": "0.0.1",
"@commitlint/cli": "17.4.2",
"@commitlint/config-conventional": "17.4.2",
"@open-wc/testing": "3.1.7",
"@storybook/addon-a11y": "7.4.6",
"@storybook/addon-actions": "7.4.6",
"@storybook/addon-essentials": "7.4.6",
"@storybook/addons": "7.4.6",
"@storybook/cli": "7.4.6",
"@storybook/manager-api": "7.4.6",
"@storybook/theming": "7.4.6",
"@storybook/web-components": "7.4.6",
"@storybook/web-components-webpack5": "7.4.6",
"@types/query-selector-shadow-dom": "^1.0.1",
"@types/react": "^18.0.27",
"@typescript-eslint/eslint-plugin": "^6.11.0",
Expand Down Expand Up @@ -84,23 +92,16 @@
"ts-node": "^10.9.1",
"typescript": "^5.3.0",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"@storybook/addon-a11y": "7.4.6",
"@storybook/addon-actions": "7.4.6",
"@storybook/addon-essentials": "7.4.6",
"@storybook/cli": "7.4.6",
"@storybook/web-components": "7.4.6",
"@storybook/web-components-webpack5": "7.4.6",
"@storybook/manager-api": "7.4.6",
"@storybook/theming": "7.4.6",
"@storybook/addons": "7.4.6"
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@lit-labs/react": "^1.1.1",
"lit": "^2.6.1",
"nested-css-to-flat": "^1.0.5"
"nested-css-to-flat": "^1.0.5",
"rimraf": "^5.0.5"
},
"engines": {
"node": "^18"
}
},
"packageManager": "[email protected]"
}
Loading

0 comments on commit 8f84ac3

Please sign in to comment.