From 25b362d71897a20b477b3e34bb42dd1b80814c91 Mon Sep 17 00:00:00 2001 From: dntzhang Date: Thu, 26 Apr 2018 09:51:32 +0800 Subject: [PATCH] add plugin example --- example/hyperscript/hello.js | 11 - example/hyperscript/index.html | 12 - example/hyperscript/main.js | 29 - example/{hyperscript => plugin-x}/bundler.js | 2095 +++++------------- example/plugin-x/index.html | 14 + example/plugin-x/main.js | 44 + example/plugin-x/omi-drag.js | 35 + package.json | 2 +- 8 files changed, 628 insertions(+), 1614 deletions(-) delete mode 100644 example/hyperscript/hello.js delete mode 100644 example/hyperscript/index.html delete mode 100644 example/hyperscript/main.js rename example/{hyperscript => plugin-x}/bundler.js (51%) create mode 100644 example/plugin-x/index.html create mode 100644 example/plugin-x/main.js create mode 100644 example/plugin-x/omi-drag.js diff --git a/example/hyperscript/hello.js b/example/hyperscript/hello.js deleted file mode 100644 index 6075bc4a1..000000000 --- a/example/hyperscript/hello.js +++ /dev/null @@ -1,11 +0,0 @@ -import Omi from '../../src/index.js' -const $ = Omi.tags -class Hello extends Omi.Component { - render() { - return $.div( 'Hello2 ' + this.data.name+'!') - } -} - -Omi.tag('Hello', Hello) - -export default Hello diff --git a/example/hyperscript/index.html b/example/hyperscript/index.html deleted file mode 100644 index 97835f276..000000000 --- a/example/hyperscript/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/example/hyperscript/main.js b/example/hyperscript/main.js deleted file mode 100644 index 10e6cfbb2..000000000 --- a/example/hyperscript/main.js +++ /dev/null @@ -1,29 +0,0 @@ -import Omi from '../../src/index.js' -import Hello from './hello.js' - -const $ = Omi.tags - -class App extends Omi.Component { - handleClick(e) { - alert(e.target.innerHTML) - } - - style() { - return ` -