Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/publish-npm-react-zpl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Publish @zpl-kit/react-zpl

on:
push:
tags:
- 'react-zpl/v*'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
version: latest

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build zpl-core
run: pnpm --filter @zpl-kit/zpl-core build

- name: Build react-zpl
run: pnpm --filter @zpl-kit/react-zpl build

- name: Run tests
run: pnpm --filter @zpl-kit/tests test --run

publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
version: latest

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Build zpl-core
run: pnpm --filter @zpl-kit/zpl-core build

- name: Build react-zpl
run: pnpm --filter @zpl-kit/react-zpl build

- name: Publish
run: pnpm --filter @zpl-kit/react-zpl publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
61 changes: 61 additions & 0 deletions .github/workflows/publish-npm-zpl-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish @zpl-kit/zpl-core

on:
push:
tags:
- 'zpl-core/v*'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
version: latest

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build zpl-core
run: pnpm --filter @zpl-kit/zpl-core build

- name: Build react-zpl
run: pnpm --filter @zpl-kit/react-zpl build

- name: Run tests
run: pnpm --filter @zpl-kit/tests test --run

publish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
version: latest

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm --filter @zpl-kit/zpl-core build

- name: Publish
run: pnpm --filter @zpl-kit/zpl-core publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test-react-zpl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- uses: pnpm/action-setup@v4
with:
Expand Down
30 changes: 21 additions & 9 deletions apps/react-zpl/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
{
"name": "@zpl-kit/react-zpl",
"version": "0.0.0",
"private": true,
"version": "0.1.0-rc.1",
"author": "boriguri <qhflrnfl4324@gmail.com>",
"license": "MIT",
"homepage": "https://boriguri.github.io/zpl-kit/",
"repository": {
"type": "git",
"url": "https://github.com/Bori-github/zpl-kit.git",
"directory": "apps/react-zpl"
},
"type": "module",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"development": "./src/index.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"scripts": {
Expand All @@ -19,15 +31,15 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@zpl-kit/zpl-core": "workspace:*",
"react": "^18.3.0",
"react-dom": "^18.3.0"
"@zpl-kit/zpl-core": "workspace:*"
},
"devDependencies": {
"rolldown": "^1.0.0-beta.51",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"typescript": "^5.7.0"
"typescript": "^5.7.0",
"react": "^18.3.0",
"react-dom": "^18.3.0"
},
"peerDependencies": {
"react": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/react-zpl/rolldown.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export default defineConfig({
format: 'es',
dir: 'dist',
},
external: ['react', 'react-dom'],
external: ['react', 'react-dom', /^react\//, /^react-dom\//],
});
22 changes: 17 additions & 5 deletions apps/zpl-core/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
{
"name": "@zpl-kit/zpl-core",
"version": "0.0.0",
"private": true,
"version": "0.1.0",
"author": "boriguri <qhflrnfl4324@gmail.com>",
"license": "MIT",
"homepage": "https://boriguri.github.io/zpl-kit/",
"repository": {
"type": "git",
"url": "https://github.com/Bori-github/zpl-kit.git",
"directory": "apps/zpl-core"
},
"type": "module",
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"development": "./src/index.ts",
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion demos/electron/electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export default defineConfig({
resolve: {
alias: {
'@renderer': resolve('src/renderer/src'),
'@zpl-kit/react-zpl': resolve('../../apps/react-zpl/src')
'@zpl-kit/react-zpl': resolve('../../apps/react-zpl/src'),
'@zpl-kit/zpl-core': resolve('../../apps/zpl-core/src')
}
},
plugins: [react()],
Expand Down
3 changes: 2 additions & 1 deletion demos/electron/tsconfig.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"paths": {
"@/*": ["./src/renderer/src/*"],
"@renderer/*": ["./src/renderer/src/*"],
"@zpl-kit/react-zpl": ["../../apps/react-zpl/src"]
"@zpl-kit/react-zpl": ["../../apps/react-zpl/src"],
"@zpl-kit/zpl-core": ["../../apps/zpl-core/src"]
}
},
"include": [
Expand Down
3 changes: 2 additions & 1 deletion demos/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@zpl-kit/react-zpl": ["../../apps/react-zpl/src"]
"@zpl-kit/react-zpl": ["../../apps/react-zpl/src"],
"@zpl-kit/zpl-core": ["../../apps/zpl-core/src"]
}
},
"include": ["src"],
Expand Down
1 change: 1 addition & 0 deletions demos/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default defineConfig({
resolve: {
alias: {
'@zpl-kit/react-zpl': resolve(__dirname, '../../apps/react-zpl/src'),
'@zpl-kit/zpl-core': resolve(__dirname, '../../apps/zpl-core/src'),
},
},
server: {
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "zpl-kit",
"version": "0.0.0",
"private": true,
"author": "boriguri <qhflrnfl4324@gmail.com>",
"license": "MIT",
"homepage": "https://boriguri.github.io/zpl-kit/",
"repository": {
"type": "git",
"url": "https://github.com/Bori-github/zpl-kit.git"
},
"type": "module",
"scripts": {
"dev": "pnpm --filter './apps/*' dev",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading