Skip to content

Commit

Permalink
trying out pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehoczky committed Dec 6, 2024
1 parent 54ce97a commit db25afc
Show file tree
Hide file tree
Showing 12 changed files with 1,008 additions and 157 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
ci:
name: ci
runs-on: ubuntu-latest
steps:
- name: Check out Git repository ⏬
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false

- name: Set up Node.js 💿
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: pnpm

- name: Install dependencies 💤
run: pnpm install

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v4
id: nx-sha
with:
main-branch-name: master

# - name: Check for Affected Projects
# id: affected-packages
# run: npx nx show projects --affected >> $GITHUB_OUTPUT

- id: affected-packages
run: echo "affected='$(npx nx show projects --affected)'" >> "$GITHUB_OUTPUT"

- run: echo ${{contains(steps.affected-packages.outputs.affected, 'demo')}}

# - name: Check formatting 🎨
# run: npx nx format:check

# - name: Lint and build projects 👷‍♀️
# run: npx nx affected -t lint build publint

# - name: Deploy demo page 🚀
# if: github.ref == 'refs/heads/master' && contains(steps.affected-packages.outputs.affected, 'demo')
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./packages/demo/dist
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
.pnpm-store
.DS_Store
dist
dist-ssr
Expand All @@ -8,3 +9,6 @@ dist-ssr
.cache
**/.vitepress/dist
**/.vitepress/cache

.nx/cache
.nx/workspace-data
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.18
22 changes: 22 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"dev": {
"dependsOn": ["^build"]
},
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist"],
"cache": true
},
"lint": {
"cache": true
},
"publint": {
"dependsOn": ["^build"],
"cache": true
}
},
"defaultBase": "master",
"nxCloudId": "67531f7052596d33778e5bad"
}
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
{
"name": "@lehoczky/vue-termynal-monorepo",
"scripts": {
"lint": "npm run eslint:check && npm run format:check",
"eslint:check": "eslint --max-warnings=0",
"eslint:fix": "eslint --max-warnings=0 --fix",
"format:check": "prettier . --check --ignore-unknown",
"format:fix": "prettier . --write --ignore-unknown"
},
"scripts": {},
"devDependencies": {
"@lehoczky/eslint-config-vue": "^2.0.4",
"@lehoczky/prettier-config": "^2.0.1",
"eslint": "^9.16.0",
"prettier": "^3.4.2",
"typescript": "~5.7.2"
"nx": "20.2.0"
},
"packageManager": "pnpm@9.14.4",
"packageManager": "pnpm@9.15.0",
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
Expand Down
11 changes: 11 additions & 0 deletions packages/docs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// @ts-check
import { configLehoczkyVue } from "@lehoczky/eslint-config-vue"

/** @type {import("eslint").Linter.Config[]} */
export default [
...configLehoczkyVue(),
{
files: ["packages/playground/**"],
rules: { "no-console": "off" },
},
]
6 changes: 5 additions & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"preview": "vitepress preview"
"preview": "vitepress preview",
"lint": "eslint --max-warnings=0",
"lint:fix": "eslint --max-warnings=0 --fix"
},
"dependencies": {
"@lehoczky/eslint-config-vue": "^2.0.4",
"@lehoczky/vue-termynal": "workspace:*",
"eslint": "^9.16.0",
"vue": "3.5.13"
},
"devDependencies": {
Expand Down
10 changes: 10 additions & 0 deletions packages/playground/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// @ts-check
import { configLehoczkyVue } from "@lehoczky/eslint-config-vue"

/** @type {import("eslint").Linter.Config[]} */
export default [
...configLehoczkyVue(),
{
rules: { "no-console": "off" },
},
]
6 changes: 5 additions & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
"preview": "vite preview",
"lint": "eslint --max-warnings=0",
"lint:fix": "eslint --max-warnings=0 --fix"
},
"dependencies": {
"@lehoczky/eslint-config-vue": "^2.0.4",
"@lehoczky/vue-termynal": "workspace:*",
"eslint": "^9.16.0",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/vue-termynal/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @ts-check
import { configLehoczkyVue } from "@lehoczky/eslint-config-vue"

/** @type {import("eslint").Linter.Config[]} */
export default [...configLehoczkyVue()]
6 changes: 5 additions & 1 deletion packages/vue-termynal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"license": "MIT",
"type": "module",
"scripts": {
"lint": "eslint --max-warnings=0",
"lint:fix": "eslint --max-warnings=0 --fix",
"build": "vite build",
"publint": "publint"
},
Expand All @@ -25,8 +27,10 @@
"vue": "^3.0.0"
},
"devDependencies": {
"@types/node": "20",
"@lehoczky/eslint-config-vue": "^2.0.4",
"@types/node": "^20.17.9",
"@vitejs/plugin-vue": "^5.2.1",
"eslint": "^9.16.0",
"publint": "^0.2.12",
"typescript": "~5.7.2",
"vite": "^6.0.3",
Expand Down
Loading

0 comments on commit db25afc

Please sign in to comment.