Skip to content

Commit

Permalink
Merge pull request #248 from idrawjs/dev-v0.4
Browse files Browse the repository at this point in the history
chore: bump version 0.4.0-beta.2
  • Loading branch information
chenshenhai authored Dec 17, 2023
2 parents b9267a0 + 2231414 commit 02e112a
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 107 deletions.
48 changes: 23 additions & 25 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,38 @@ name: Coverage

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm config set registry https://registry.yarnpkg.com/
# - run: npm install
- run: npm install --global pnpm
- run: pnpm i
- run: npm run beforetest
- run: npm run cover
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: /home/runner/work/idraw/idraw/reports/clover.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm config set registry https://registry.yarnpkg.com/
# - run: npm install
- run: npm install --global pnpm
- run: pnpm i
- run: npm run beforetest
- run: npm run cover
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: /home/runner/work/idraw/idraw/reports/clover.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

29 changes: 14 additions & 15 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@ name: Node.js CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm config set registry https://registry.yarnpkg.com/
# - run: npm install
- run: npm install --global pnpm
- run: pnpm i
- run: npm run beforetest
- run: npm run test
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm config set registry https://registry.yarnpkg.com/
# - run: npm install
- run: npm install --global pnpm
- run: pnpm i
- run: npm run beforetest
- run: npm run test
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ jobs:
- run: pnpm i
- run: npm run test
- run: npm run build
- run: npm publish --provenance --access public -w ./packages/types --tag next
# - run: npm publish --provenance --access public -w ./packages/types --tag next
- run: npm publish --provenance --access public -w ./packages/types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/util --tag next
- run: npm publish --provenance --access public -w ./packages/util
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/renderer --tag next
- run: npm publish --provenance --access public -w ./packages/renderer
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/board --tag next
- run: npm publish --provenance --access public -w ./packages/board
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/core --tag next
- run: npm publish --provenance --access public -w ./packages/core
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --provenance --access public -w ./packages/idraw --tag next
- run: npm publish --provenance --access public -w ./packages/idraw
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<img src="https://github.com/idrawjs/idraw/actions/workflows/node.js.yml/badge.svg?branch=main" alt="CI">
<a>

<a href="https://codecov.io/gh/idrawjs/idraw">
<!-- <a href="https://codecov.io/gh/idrawjs/idraw">
<img src="https://codecov.io/gh/idrawjs/idraw/branch/main/graph/badge.svg?token=MICIC9SCKY"/>
</a>
</a> -->

<a href="https://www.npmjs.com/package/idraw">
<img src="https://img.shields.io/npm/v/idraw.svg?sanitize=idraw" alt="Version">
Expand Down Expand Up @@ -54,7 +54,11 @@
The preview of `@idraw/studo`. Click [here](https://github.com/idrawjs/studio) to get it.

<div style="text-align: center">
<img src="./assets/preview/idraw-studio-preview.png" width="700" />
<img src="./assets/preview/idraw-studio-dark.png" width="700" />
</div>

<div style="text-align: center">
<img src="./assets/preview/idraw-studio-light.png" width="700" />
</div>

## Install
Expand All @@ -75,8 +79,6 @@ const idraw = new iDraw(
{
width: 600,
height: 400,
contextWidth: 600,
contextHeight: 400,
devicePixelRatio: 1,
}
);
Expand All @@ -87,8 +89,8 @@ idraw.addElement({
w: 200,
h: 100,
type: "rect",
desc: {
bgColor: "#f7d3c1",
detail: {
background: "#f7d3c1",
borderRadius: 20,
borderWidth: 4,
borderColor: "#ff6032",
Expand All @@ -107,9 +109,7 @@ function Demo() {
useEffect(() => {
const idraw = new iDraw(ref.current, {
width: 600,
height: 400,
contextWidth: 600,
contextHeight: 400,
height: 400,
devicePixelRatio: 1,
});
idraw.addElement({
Expand All @@ -119,8 +119,8 @@ function Demo() {
w: 200,
h: 100,
type: "rect",
desc: {
bgColor: "#f7d3c1",
detail: {
background: "#f7d3c1",
borderRadius: 20,
borderWidth: 4,
borderColor: "#ff6032",
Expand Down Expand Up @@ -149,9 +149,7 @@ const mount = ref();
onMounted(() => {
const idraw = new iDraw(mount.value, {
width: 600,
height: 400,
contextWidth: 600,
contextHeight: 400,
height: 400,
devicePixelRatio: 1,
});
idraw.addElement({
Expand All @@ -161,8 +159,8 @@ onMounted(() => {
w: 200,
h: 100,
type: "rect",
desc: {
bgColor: "#f7d3c1",
detail: {
background: "#f7d3c1",
borderRadius: 20,
borderWidth: 4,
borderColor: "#ff6032",
Expand All @@ -183,8 +181,8 @@ To contribute, please follow the steps:

- `git clone [email protected]:idrawjs/idraw.git`
- `cd idraw`
- `npm i`
- `npm run init`
- `pnpm i`
- `npm run dev`

### Step 2: Development

Expand Down
Binary file added assets/preview/idraw-studio-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/preview/idraw-studio-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/preview/idraw-studio-preview.png
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": false,
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"workspaces": [
"packages/*"
],
Expand Down
8 changes: 4 additions & 4 deletions packages/board/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/board",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand All @@ -21,12 +21,12 @@
"author": "chenshenhai",
"license": "MIT",
"devDependencies": {
"@idraw/types": "^0.4.0-beta.1"
"@idraw/types": "^0.4.0-beta.2"
},
"dependencies": {},
"peerDependencies": {
"@idraw/util": "^0.4.0-beta.1",
"@idraw/renderer": "^0.4.0-beta.1"
"@idraw/util": "^0.4.0-beta.2",
"@idraw/renderer": "^0.4.0-beta.2"
},
"publishConfig": {
"access": "public",
Expand Down
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/core",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand All @@ -21,13 +21,13 @@
"author": "chenshenhai",
"license": "MIT",
"devDependencies": {
"@idraw/types": "^0.4.0-beta.1"
"@idraw/types": "^0.4.0-beta.2"
},
"dependencies": {},
"peerDependencies": {
"@idraw/board": "^0.4.0-beta.1",
"@idraw/renderer": "^0.4.0-beta.1",
"@idraw/util": "^0.4.0-beta.1"
"@idraw/board": "^0.4.0-beta.2",
"@idraw/renderer": "^0.4.0-beta.2",
"@idraw/util": "^0.4.0-beta.2"
},
"publishConfig": {
"access": "public",
Expand Down
12 changes: 6 additions & 6 deletions packages/idraw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idraw",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand All @@ -22,11 +22,11 @@
"license": "MIT",
"devDependencies": {},
"dependencies": {
"@idraw/board": "^0.4.0-beta.1",
"@idraw/core": "^0.4.0-beta.1",
"@idraw/renderer": "^0.4.0-beta.1",
"@idraw/types": "^0.4.0-beta.1",
"@idraw/util": "^0.4.0-beta.1"
"@idraw/board": "^0.4.0-beta.2",
"@idraw/core": "^0.4.0-beta.2",
"@idraw/renderer": "^0.4.0-beta.2",
"@idraw/types": "^0.4.0-beta.2",
"@idraw/util": "^0.4.0-beta.2"
},
"publishConfig": {
"access": "public",
Expand Down
8 changes: 4 additions & 4 deletions packages/lab/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@idraw/lab",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"dependencies": {
"@ant-design/icons": "^5.1.3",
"@idraw/core": "^0.4.0-beta.1",
"@idraw/util": "^0.4.0-beta.1",
"@idraw/core": "^0.4.0-beta.2",
"@idraw/util": "^0.4.0-beta.2",
"antd": "^5.5.0",
"classnames": "^2.3.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@idraw/types": "^0.4.0-beta.1",
"@idraw/types": "^0.4.0-beta.2",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.1"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/renderer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/renderer",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand All @@ -21,11 +21,11 @@
"author": "chenshenhai",
"license": "MIT",
"devDependencies": {
"@idraw/types": "^0.4.0-beta.1"
"@idraw/types": "^0.4.0-beta.2"
},
"dependencies": {},
"peerDependencies": {
"@idraw/util": "^0.4.0-beta.1"
"@idraw/util": "^0.4.0-beta.2"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/types",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "",
"main": "src/index.ts",
"types": "src/index.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/util/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/util",
"version": "0.4.0-beta.1",
"version": "0.4.0-beta.2",
"description": "",
"main": "dist/esm/index.js",
"module": "dist/esm/index.js",
Expand Down
Loading

0 comments on commit 02e112a

Please sign in to comment.