Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.

Commit 6df9f08

Browse files
authored
chore(workspaces): yarn workspace (#108)
* chore(workspaces): setup workspaces * chore(app): rename dir * chore(config): rename dir * chore(git): rename git repo * chore(app): rename package name * chore(workflows): fix to with workspaces command * chore(workflows): remove cache job
1 parent 997a230 commit 6df9f08

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+8102
-11325
lines changed

.github/workflows/deploy-app-develop.yml

+8-26
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- develop
77
paths:
8-
- packages/yukukuru-app/**
8+
- packages/app/**
99

1010
jobs:
1111
build:
@@ -20,32 +20,14 @@ jobs:
2020
with:
2121
node-version: 10
2222

23-
- name: Get yarn cache directory path
24-
id: yarn-cache-dir-path
25-
run: echo "::set-output name=dir::$(yarn cache dir)"
26-
27-
- uses: actions/cache@v2
28-
id: yarn-cache
29-
with:
30-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31-
key: ${{ runner.os }}-yarn-${{ hashFiles('./packages/yukukuru-app/yarn.lock') }}
32-
restore-keys: |
33-
${{ runner.os }}-yarn-
34-
35-
- name: Install dependencies on root
36-
run: yarn --frozen-lockfile
37-
38-
- name: Install dependencies on app
23+
- name: Install dependencies
3924
run: yarn --frozen-lockfile
40-
working-directory: ./packages/yukukuru-app
4125

42-
- name: Run lint on app
43-
run: yarn lint
44-
working-directory: ./packages/yukukuru-app
26+
- name: Run lint
27+
run: yarn workspace @yukukuru/app lint
4528

46-
- name: Run build on app
47-
run: yarn build
48-
working-directory: ./packages/yukukuru-app
29+
- name: Run build
30+
run: yarn workspace @yukukuru/app build
4931
env:
5032
PUBLIC_URL: ${{ secrets.PUBLIC_URL_DEVELOP }}
5133
GOOGLE_ANALYTICS: ${{ secrets.GOOGLE_ANALYTICS_DEVELOP }}
@@ -61,7 +43,7 @@ jobs:
6143
uses: actions/upload-artifact@master
6244
with:
6345
name: app-dist
64-
path: ./packages/yukukuru-app/out
46+
path: ./packages/app/out
6547

6648
deploy:
6749
name: Deploy app
@@ -84,7 +66,7 @@ jobs:
8466
uses: actions/download-artifact@master
8567
with:
8668
name: app-dist
87-
path: ./packages/yukukuru-app/out
69+
path: ./packages/app/out
8870

8971
- name: Install to firebase-tools
9072
run: npm i -g firebase-tools

.github/workflows/deploy-app-production.yml

+8-26
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
paths:
8-
- packages/yukukuru-app/**
8+
- packages/app/**
99

1010
jobs:
1111
build:
@@ -20,32 +20,14 @@ jobs:
2020
with:
2121
node-version: 10
2222

23-
- name: Get yarn cache directory path
24-
id: yarn-cache-dir-path
25-
run: echo "::set-output name=dir::$(yarn cache dir)"
26-
27-
- uses: actions/cache@v2
28-
id: yarn-cache
29-
with:
30-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
31-
key: ${{ runner.os }}-yarn-${{ hashFiles('./packages/yukukuru-app/yarn.lock') }}
32-
restore-keys: |
33-
${{ runner.os }}-yarn-
34-
35-
- name: Install dependencies on root
36-
run: yarn --frozen-lockfile
37-
38-
- name: Install dependencies on app
23+
- name: Install dependencies
3924
run: yarn --frozen-lockfile
40-
working-directory: ./packages/yukukuru-app
4125

42-
- name: Run lint on app
43-
run: yarn lint
44-
working-directory: ./packages/yukukuru-app
26+
- name: Run lint
27+
run: yarn workspace @yukukuru/app lint
4528

46-
- name: Run build on app
47-
run: yarn build
48-
working-directory: ./packages/yukukuru-app
29+
- name: Run build
30+
run: yarn workspace @yukukuru/app build
4931
env:
5032
PUBLIC_URL: ${{ secrets.PUBLIC_URL }}
5133
GOOGLE_ANALYTICS: ${{ secrets.GOOGLE_ANALYTICS }}
@@ -61,7 +43,7 @@ jobs:
6143
uses: actions/upload-artifact@master
6244
with:
6345
name: app-dist
64-
path: ./packages/yukukuru-app/out
46+
path: ./packages/app/out
6547

6648
deploy:
6749
name: Deploy app
@@ -84,7 +66,7 @@ jobs:
8466
uses: actions/download-artifact@master
8567
with:
8668
name: app-dist
87-
path: ./packages/yukukuru-app/out
69+
path: ./packages/app/out
8870

8971
- name: Install to firebase-tools
9072
run: npm i -g firebase-tools

.github/workflows/test-functions.yml

+6-24
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,11 @@ jobs:
1616
with:
1717
node-version: '10.x'
1818

19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
19+
- name: Install dependencies
20+
run: yarn --frozen-lockfile
2221

23-
- uses: actions/cache@v1
24-
id: yarn-cache
25-
with:
26-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
27-
key: ${{ runner.os }}-yarn-${{ hashFiles('./packages/functions/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-yarn-
30-
31-
- name: Install dependencies on root
32-
run: yarn
33-
34-
- name: Install dependencies on functions
35-
run: yarn
36-
working-directory: ./packages/functions
37-
38-
- name: Run lint on functions
39-
run: yarn lint
40-
working-directory: ./packages/functions
22+
- name: Run lint
23+
run: yarn workspace @yukukuru/functions lint
4124

42-
- name: Run build on functions
43-
run: yarn build
44-
working-directory: ./packages/functions
25+
- name: Run build
26+
run: yarn workspace @yukukuru/functions build

.github/workflows/test-types.yml

+3-20
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,8 @@ jobs:
1616
with:
1717
node-version: '10.x'
1818

19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
22-
23-
- uses: actions/cache@v1
24-
id: yarn-cache
25-
with:
26-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
27-
key: ${{ runner.os }}-yarn-${{ hashFiles('./packages/types/yarn.lock') }}
28-
restore-keys: |
29-
${{ runner.os }}-yarn-
30-
31-
- name: Install dependencies on root
32-
run: yarn --frozen-lockfile
33-
34-
- name: Install dependencies on types
19+
- name: Install dependencies
3520
run: yarn --frozen-lockfile
36-
working-directory: ./packages/types
3721

38-
- name: Run lint on types
39-
run: yarn lint
40-
working-directory: ./packages/types
22+
- name: Run lint
23+
run: yarn workspace @yukukuru/types lint

README.md

+1-1

firebase.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"hosting": [
1111
{
1212
"target": "app",
13-
"public": "packages/yukukuru-app/out",
13+
"public": "packages/app/out",
1414
"ignore": [
1515
"firebase.json",
1616
"**/.*",

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
22
"name": "yukukuru",
3-
"version": "0.101.0",
43
"homepage": "https://yukukuru.app",
54
"license": "UNLICENSED",
65
"private": true,
7-
"repository": "[email protected]:amotarao/yukukuru-app.git",
6+
"repository": "[email protected]:amotarao/yukukuru.git",
87
"author": "Amon Sawamura <[email protected]>",
8+
"workspaces": [
9+
"packages/**"
10+
],
911
"devDependencies": {
1012
"@typescript-eslint/eslint-plugin": "^2.26.0",
1113
"@typescript-eslint/parser": "^2.26.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/yukukuru-app/package.json renamed to packages/app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"name": "@yukukuru/yukukuru-app",
2+
"name": "@yukukuru/app",
3+
"version": "0.1.0",
34
"homepage": "https://yukukuru.app",
45
"license": "UNLICENSED",
56
"scripts": {
@@ -29,7 +30,6 @@
2930
"@types/react-transition-group": "^4.2.4",
3031
"@typescript-eslint/eslint-plugin": "^2.29.0",
3132
"@typescript-eslint/parser": "^2.29.0",
32-
"@yukukuru/types": "../types",
3333
"dotenv": "^8.2.0",
3434
"eslint": "^6.8.0",
3535
"eslint-config-prettier": "^6.11.0",
File renamed without changes.

packages/yukukuru-app/src/components/organisms/GitHubButton/GitHubButton.tsx renamed to packages/app/src/components/organisms/GitHubButton/GitHubButton.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ export const GitHubButton: React.FC<GitHubButtonProps> = ({ size = 'normal' }) =
1414
return (
1515
<div css={style.wrapper} data-size={isNormal ? undefined : size}>
1616
<ReactGitHubButton
17-
href="https://github.com/amotarao/yukukuru-app"
17+
href="https://github.com/amotarao/yukukuru"
1818
data-icon="octicon-star"
19-
aria-label="Star amotarao/yukukuru-app on GitHub"
19+
aria-label="Star amotarao/yukukuru on GitHub"
2020
>
2121
Star
2222
</ReactGitHubButton>
File renamed without changes.

packages/functions/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "@yukukuru/functions",
3+
"version": "0.1.0",
34
"homepage": "https://yukukuru.app",
45
"license": "UNLICENSED",
56
"scripts": {
6-
"preinstall": "if [ -d ../types ]; then npm pack ../types; fi",
77
"build": "rm -rf lib/* && tsc",
88
"serve": "npm run build && firebase serve --only functions",
99
"shell": "npm run build && firebase functions:shell",
@@ -25,7 +25,6 @@
2525
"devDependencies": {
2626
"@types/lodash": "^4.14.149",
2727
"@types/twitter": "^1.7.0",
28-
"@yukukuru/types": "file:./yukukuru-types-0.2.8.tgz",
2928
"eslint": "^6.8.0",
3029
"typescript": "^3.8.3"
3130
}

0 commit comments

Comments
 (0)