Skip to content

Commit

Permalink
0.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
b4rtaz committed Nov 21, 2023
1 parent 4e1c93e commit ebfc7e0
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.0

This version improves support for UMD bundles.

## 0.1.1

Add `stroke` and `strokeWidth` fields to the properties editor for the textbox.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ Add the below code to your head section in HTML document.
```html
<head>
...
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/editor.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/editor.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js"></script>
```

Create the editor by:
Expand Down
4 changes: 2 additions & 2 deletions demos/svelte-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"prettier:fix": "prettier --write ./src"
},
"dependencies": {
"mini-canvas-editor": "^0.1.1",
"mini-canvas-core": "^0.1.1",
"mini-canvas-editor": "^0.2.0",
"mini-canvas-core": "^0.2.0",
"fabric": "6.0.0-beta13",
"canvas": "^2.11.2"
},
Expand Down
4 changes: 2 additions & 2 deletions demos/webpack-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"prettier:fix": "prettier --write ./src ./public/**/*.html ./public/**/*.css"
},
"dependencies": {
"mini-canvas-editor": "^0.1.1",
"mini-canvas-core": "^0.1.1"
"mini-canvas-editor": "^0.2.0",
"mini-canvas-core": "^0.2.0"
},
"devDependencies": {
"ts-loader": "^9.4.2",
Expand Down
19 changes: 17 additions & 2 deletions demos/webpack-app/public/vanilla-javascript.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,23 @@ <h1>📦 Vanilla JavaScript Example</h1>
</p>
<p>This example uses vanilla JavaScript!</p>

<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/editor.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js"></script>
<script>
const isLocalhost = ['localhost', '127.0.0.1'].includes(location.hostname);
const cssUrl = isLocalhost
? '../../../editor/css/editor.css'
: 'https://cdn.jsdelivr.net/npm/[email protected]/css/editor.css';
const coreUrl = isLocalhost
? '../../../core/dist/index.umd.js'
: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js';
const editorUrl = isLocalhost
? '../../../editor/dist/index.umd.js'
: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.js';

document.write('<link href="' + cssUrl + '" rel="stylesheet" \/>');
document.write('<script src="' + coreUrl + '"><\/script>');
document.write('<script src="' + editorUrl + '"><\/script>');
</script>

<script>
const placeholder = document.getElementById('placeholder');
const saveButton = document.getElementById('saveButton');
Expand Down

0 comments on commit ebfc7e0

Please sign in to comment.