Skip to content

Commit

Permalink
no nx (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev authored Apr 17, 2024
1 parent 9f47579 commit c3a3bb4
Show file tree
Hide file tree
Showing 100 changed files with 3,647 additions and 8,025 deletions.
1 change: 1 addition & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"commit": "../tools/utils/commit_message.js",
"fixed": [],
"linked": [],
"ignore": ["website", "*-demo"],
"access": "public",
"baseBranch": "origin/master",
"updateInternalDependencies": "patch"
Expand Down
8 changes: 8 additions & 0 deletions .changeset/thin-readers-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@withease/factories': patch
'@withease/i18next': patch
'@withease/redux': patch
'@withease/web-api': patch
---

Update toolchain
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint:changes
- run: pnpm pnpm changeset status
43 changes: 28 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI

on: push
on: [pull_request, push]

jobs:
checks:
code:
runs-on: ubuntu-latest

steps:
Expand All @@ -14,13 +14,24 @@ jobs:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint:format
- run: pnpm lint:workspace
- run: pnpm test
- run: pnpm test:types
- run: pnpm lint
- run: pnpm build
- run: pnpm size
- run: pnpm run format:check
- run: pnpm run -r build
- run: pnpm run -r test:run
pkg:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm run -r build
- run: pnpm run -r size
- run: pnpm run -r publint
- run: pnpm run -r typelint
e2e:
runs-on: ubuntu-latest

Expand All @@ -33,9 +44,10 @@ jobs:
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm playwright install
- run: pnpm test:e2e
- run: pnpm run -r build
- run: pnpm run -r e2e

checks_old_versions:
code_old_versions:
runs-on: ubuntu-latest

strategy:
Expand All @@ -49,13 +61,13 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile

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

- run: pnpm test
- run: pnpm test:types
- run: pnpm run -r build
- run: pnpm run -r test:run

e2e_old_versions:
runs-on: ubuntu-latest

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

- run: pnpm playwright install
- run: pnpm test:e2e
- run: pnpm run -r build
- run: pnpm run -r e2e
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
- run: |
echo "//registry.npmjs.org/:_authToken="${{secrets.NPM_TOKEN}}"" > ~/.npmrc
shell: sh
- run: pnpm nx run-many --output-style=static --target=publish --all
- run: pnpm run -r build
- run: pnpm -r publish --no-git-checks
4 changes: 2 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
cache: 'pnpm'
- run: pnpm install --frozen-lockfile

- run: pnpm nx build website
- run: pnpm run -r build

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 1d6db711ad880b2455da08a6aeb2a119
projectName: withease
directory: dist/apps/website
directory: apps/website/docs/.vitepress/dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,23 @@ A set of libraries and recipes to make frontend development easier thanks to Eff
- install deps via `pnpm install`
- make changes
- make sure that your changes is passing checks:
- run tests via `pnpm test`
- run type tests via `pnpm test:types`
- run linter via `pnpm lint`
- try to build it via `pnpm build`
- format code via `pnpm format`
- fill in changes via `pnpm changes`
- run tests via `pnpm run -r test:run`
- try to build it via `pnpm run -r build`
- format code via `pnpm run format:check`
- fill in changes via `pnpm changeset`
- open a PR
- enjoy 🎉

### Release workflow

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).
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).

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.

### Repository management

#### New package creation

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.

Fancy generator will be added in the future.
22 changes: 0 additions & 22 deletions apps/web-api-demo-e2e/.eslintrc.json

This file was deleted.

10 changes: 0 additions & 10 deletions apps/web-api-demo-e2e/playwright.config.ts

This file was deleted.

40 changes: 0 additions & 40 deletions apps/web-api-demo-e2e/project.json

This file was deleted.

10 changes: 0 additions & 10 deletions apps/web-api-demo-e2e/tsconfig.e2e.json

This file was deleted.

9 changes: 0 additions & 9 deletions apps/web-api-demo-e2e/tsconfig.json

This file was deleted.

10 changes: 0 additions & 10 deletions apps/web-api-demo/.eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web-api-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
- clone the repo
- ensure that `pnpm` is installed
- install dependencies via `pnpm install`
- start showcase via `pnpm nx serve web-api-demo`
- start showcase via `pnpm --filter web-api-demo dev`
12 changes: 12 additions & 0 deletions apps/web-api-demo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "web-api-demo",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"e2e": "playwright test"
},
"dependencies": {
"@withease/web-api": "workspace:*"
}
}
15 changes: 15 additions & 0 deletions apps/web-api-demo/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
retries: 3,
maxFailures: 2,
timeout: 120000,
use: { baseURL: 'http://localhost:5173' },
webServer: {
command: 'pnpm --filter web-api-demo dev',
url: 'http://localhost:5173',
reuseExistingServer: !process.env.CI,
},
};

export default config;
43 changes: 0 additions & 43 deletions apps/web-api-demo/project.json

This file was deleted.

File renamed without changes.
Loading

0 comments on commit c3a3bb4

Please sign in to comment.