Skip to content

Commit

Permalink
Merge pull request #77 from idrawjs/dev
Browse files Browse the repository at this point in the history
v0.2.0-alpha.0
  • Loading branch information
chenshenhai authored Sep 8, 2021
2 parents ef4e870 + c61b05a commit ca465f5
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 19 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ idraw.addElement({
h: 100,
type: "rect",
desc: {
color: "#f7d3c1",
bgColor: "#f7d3c1",
borderRadius: 20,
borderWidth: 4,
borderColor: "#ff6032",
Expand All @@ -93,5 +93,4 @@ To contribute, please follow the steps:
- `npm run serve` for starting a server
- https://127.0.0.1:8080
- https://127.0.0.1:8080/packages/idraw/examples/features/
- https://127.0.0.1:8080/packages/core/examples/features/
- https://127.0.0.1:8080/packages/board/examples/features/
- https://127.0.0.1:8080/packages/core/examples/features/
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"packages/core",
"packages/idraw"
],
"version": "0.1.13"
"version": "0.2.0-alpha.0"
}
6 changes: 3 additions & 3 deletions packages/board/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/board",
"version": "0.1.13",
"version": "0.2.0-alpha.0",
"description": "",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand All @@ -23,10 +23,10 @@
"author": "chenshenhai",
"license": "MIT",
"devDependencies": {
"@idraw/types": "^0.1.13"
"@idraw/types": "^0.2.0-alpha.0"
},
"dependencies": {
"@idraw/util": "^0.1.13"
"@idraw/util": "^0.2.0-alpha.0"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@idraw/core",
"version": "0.1.13",
"version": "0.2.0-alpha.0",
"description": "",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand All @@ -23,11 +23,11 @@
"author": "chenshenhai",
"license": "MIT",
"devDependencies": {
"@idraw/types": "^0.1.13"
"@idraw/types": "^0.2.0-alpha.0"
},
"dependencies": {
"@idraw/board": "^0.1.13",
"@idraw/util": "^0.1.13"
"@idraw/board": "^0.2.0-alpha.0",
"@idraw/util": "^0.2.0-alpha.0"
},
"publishConfig": {
"access": "public"
Expand Down
50 changes: 48 additions & 2 deletions packages/idraw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,51 @@

<hr/>

- [Documents](https://idrawjs.github.io/docs/en/) | [中文文档](https://idrawjs.github.io/docs/zh/) (`//TODO`)
- [Playground](https://idrawjs.github.io/playground/)
- [Documents](https://idraw.js.org/docs/en/) | [中文文档](https://idraw.js.org/docs/zh/)
- [Online Playground](https://idraw.js.org/playground/) | [在线API示例](https://idraw.js.org/playground/)
- [Online Studio](https://idraw.js.org/studio/) | [在线绘图演示](https://idraw.js.org/studio/)

## @idraw/studio Preview

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" />
</div>

## Install

```
npm i idraw
```

## Getting Started

```js
import iDraw from 'idraw';

const idraw = new iDraw(
document.querySelector('#app'),
{
width: 600,
height: 400,
contextWidth: 600,
contextHeight: 400,
devicePixelRatio: 4,
}
);
idraw.addElement({
name: "rect-1",
x: 140,
y: 120,
w: 200,
h: 100,
type: "rect",
desc: {
bgColor: "#f7d3c1",
borderRadius: 20,
borderWidth: 4,
borderColor: "#ff6032",
},
});
```
8 changes: 4 additions & 4 deletions packages/idraw/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "idraw",
"version": "0.1.13",
"version": "0.2.0-alpha.0",
"description": "",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand All @@ -23,11 +23,11 @@
"author": "chenshenhai",
"license": "MIT",
"devDependencies": {
"@idraw/types": "^0.1.13"
"@idraw/types": "^0.2.0-alpha.0"
},
"dependencies": {
"@idraw/core": "^0.1.13",
"@idraw/util": "^0.1.13"
"@idraw/core": "^0.2.0-alpha.0",
"@idraw/util": "^0.2.0-alpha.0"
},
"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.1.13",
"version": "0.2.0-alpha.0",
"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.1.13",
"version": "0.2.0-alpha.0",
"description": "",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand Down

0 comments on commit ca465f5

Please sign in to comment.