Skip to content

Commit c3a3bb4

Browse files
authored
no nx (#82)
1 parent 9f47579 commit c3a3bb4

File tree

100 files changed

+3647
-8025
lines changed

Some content is hidden

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

100 files changed

+3647
-8025
lines changed

.changeset/config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"commit": "../tools/utils/commit_message.js",
55
"fixed": [],
66
"linked": [],
7+
"ignore": ["website", "*-demo"],
78
"access": "public",
89
"baseBranch": "origin/master",
910
"updateInternalDependencies": "patch"

.changeset/thin-readers-impress.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@withease/factories': patch
3+
'@withease/i18next': patch
4+
'@withease/redux': patch
5+
'@withease/web-api': patch
6+
---
7+
8+
Update toolchain

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
node-version-file: '.nvmrc'
1919
cache: 'pnpm'
2020
- run: pnpm install --frozen-lockfile
21-
- run: pnpm lint:changes
21+
- run: pnpm pnpm changeset status

.github/workflows/ci.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: CI
22

3-
on: push
3+
on: [pull_request, push]
44

55
jobs:
6-
checks:
6+
code:
77
runs-on: ubuntu-latest
88

99
steps:
@@ -14,13 +14,24 @@ jobs:
1414
node-version-file: '.nvmrc'
1515
cache: 'pnpm'
1616
- run: pnpm install --frozen-lockfile
17-
- run: pnpm lint:format
18-
- run: pnpm lint:workspace
19-
- run: pnpm test
20-
- run: pnpm test:types
21-
- run: pnpm lint
22-
- run: pnpm build
23-
- run: pnpm size
17+
- run: pnpm run format:check
18+
- run: pnpm run -r build
19+
- run: pnpm run -r test:run
20+
pkg:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: pnpm/action-setup@v2
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version-file: '.nvmrc'
29+
cache: 'pnpm'
30+
- run: pnpm install --frozen-lockfile
31+
- run: pnpm run -r build
32+
- run: pnpm run -r size
33+
- run: pnpm run -r publint
34+
- run: pnpm run -r typelint
2435
e2e:
2536
runs-on: ubuntu-latest
2637

@@ -33,9 +44,10 @@ jobs:
3344
cache: 'pnpm'
3445
- run: pnpm install --frozen-lockfile
3546
- run: pnpm playwright install
36-
- run: pnpm test:e2e
47+
- run: pnpm run -r build
48+
- run: pnpm run -r e2e
3749

38-
checks_old_versions:
50+
code_old_versions:
3951
runs-on: ubuntu-latest
4052

4153
strategy:
@@ -49,13 +61,13 @@ jobs:
4961
with:
5062
node-version-file: '.nvmrc'
5163
cache: 'pnpm'
52-
- run: pnpm install --frozen-lockfile
5364

5465
- run: node ./tools/other-majors/prepare.mjs ${{ matrix.version }}
5566
- run: pnpm install --no-frozen-lockfile
5667

57-
- run: pnpm test
58-
- run: pnpm test:types
68+
- run: pnpm run -r build
69+
- run: pnpm run -r test:run
70+
5971
e2e_old_versions:
6072
runs-on: ubuntu-latest
6173

@@ -76,4 +88,5 @@ jobs:
7688
- run: pnpm install --no-frozen-lockfile
7789

7890
- run: pnpm playwright install
79-
- run: pnpm test:e2e
91+
- run: pnpm run -r build
92+
- run: pnpm run -r e2e

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ jobs:
1919
- run: |
2020
echo "//registry.npmjs.org/:_authToken="${{secrets.NPM_TOKEN}}"" > ~/.npmrc
2121
shell: sh
22-
- run: pnpm nx run-many --output-style=static --target=publish --all
22+
- run: pnpm run -r build
23+
- run: pnpm -r publish --no-git-checks

.github/workflows/website.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
cache: 'pnpm'
2121
- run: pnpm install --frozen-lockfile
2222

23-
- run: pnpm nx build website
23+
- run: pnpm run -r build
2424

2525
- name: Publish to Cloudflare Pages
2626
uses: cloudflare/pages-action@v1
2727
with:
2828
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
2929
accountId: 1d6db711ad880b2455da08a6aeb2a119
3030
projectName: withease
31-
directory: dist/apps/website
31+
directory: apps/website/docs/.vitepress/dist
3232
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,23 @@ A set of libraries and recipes to make frontend development easier thanks to Eff
1010
- install deps via `pnpm install`
1111
- make changes
1212
- make sure that your changes is passing checks:
13-
- run tests via `pnpm test`
14-
- run type tests via `pnpm test:types`
15-
- run linter via `pnpm lint`
16-
- try to build it via `pnpm build`
17-
- format code via `pnpm format`
18-
- fill in changes via `pnpm changes`
13+
- run tests via `pnpm run -r test:run`
14+
- try to build it via `pnpm run -r build`
15+
- format code via `pnpm run format:check`
16+
- fill in changes via `pnpm changeset`
1917
- open a PR
2018
- enjoy 🎉
2119

2220
### Release workflow
2321

24-
Releases of With Ease are automated by [changesets](https://github.com/changesets/changesets) and GitHub Actions. Your only duty is creating changeset for every PR, it is controlled by [Changes-action](./.github/workflows/changes.yml).
22+
Releases of Farfetched are automated by [changesets](https://github.com/changesets/changesets) and GitHub Actions. Your only duty is creating changeset for every PR, it is controlled by [Changes-action](./.github/workflows/changes.yml).
2523

2624
After merging PR to master-branch, [Version-action](./.github/workflows/version.yml) will update special PR with the next release. To publish this release, just merge special PR and wait, [Release-action](./.github/workflows/release.yml) will publish packages.
25+
26+
### Repository management
27+
28+
#### New package creation
29+
30+
Copy-paste `packages/web-api` directory, rename it to the package name. Then, update `package.json`, `README.md` and `vite.config.js` files. Then, delete `CHANGELOG.md` file and any other files that are not needed in the new package.
31+
32+
Fancy generator will be added in the future.

apps/web-api-demo-e2e/.eslintrc.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

apps/web-api-demo-e2e/playwright.config.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/web-api-demo-e2e/project.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

apps/web-api-demo-e2e/tsconfig.e2e.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/web-api-demo-e2e/tsconfig.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

apps/web-api-demo/.eslintrc.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/web-api-demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
- clone the repo
66
- ensure that `pnpm` is installed
77
- install dependencies via `pnpm install`
8-
- start showcase via `pnpm nx serve web-api-demo`
8+
- start showcase via `pnpm --filter web-api-demo dev`

apps/web-api-demo/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "web-api-demo",
3+
"private": true,
4+
"scripts": {
5+
"dev": "vite dev",
6+
"build": "vite build",
7+
"e2e": "playwright test"
8+
},
9+
"dependencies": {
10+
"@withease/web-api": "workspace:*"
11+
}
12+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { PlaywrightTestConfig } from '@playwright/test';
2+
3+
const config: PlaywrightTestConfig = {
4+
retries: 3,
5+
maxFailures: 2,
6+
timeout: 120000,
7+
use: { baseURL: 'http://localhost:5173' },
8+
webServer: {
9+
command: 'pnpm --filter web-api-demo dev',
10+
url: 'http://localhost:5173',
11+
reuseExistingServer: !process.env.CI,
12+
},
13+
};
14+
15+
export default config;

apps/web-api-demo/project.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)