diff --git a/demo/build.config.js b/demo/build.config.js index 48a680a..97a0777 100644 --- a/demo/build.config.js +++ b/demo/build.config.js @@ -7,7 +7,8 @@ 'paths': { 'es6': '../es6', 'babel': '../node_modules/@babel/standalone/babel.min', - 'babel-plugin-module-resolver': '../node_modules/babel-plugin-module-resolver-standalone/index' + 'babel-plugin-module-resolver': '../node_modules/babel-plugin-module-resolver-standalone/index', + 'lit-html': '../node_modules/lit-html/lit-html' }, 'exclude': ['babel', 'babel-plugin-module-resolver'], diff --git a/demo/index.html b/demo/index.html index 0a9f646..da0e15a 100644 --- a/demo/index.html +++ b/demo/index.html @@ -13,7 +13,8 @@ paths: { es6: '../es6', babel: '../node_modules/@babel/standalone/babel.min', - 'babel-plugin-module-resolver': '../node_modules/babel-plugin-module-resolver-standalone/index' + 'babel-plugin-module-resolver': '../node_modules/babel-plugin-module-resolver-standalone/index', + 'lit-html': '../node_modules/lit-html/lit-html' } }); diff --git a/demo/src/class.js b/demo/src/class.js index 22ff7ce..0054168 100644 --- a/demo/src/class.js +++ b/demo/src/class.js @@ -1,11 +1,16 @@ -import sum from 'src/sum'; +import sum from './sum'; +import { html, render } from 'lit-html'; console.log( sum(1,2) ); class A { constructor(a) { - console.log('Hello ' + a); + this.message = 'Hello ' + a; + console.log(this.message); } } -new A('world!'); +const a = new A('world!'); + +render(html`

+${a.message}, 1 + 2 = ${sum(1,2)}!`, document.body); diff --git a/package.json b/package.json index 3526f7f..0fdd3d5 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@babel/polyfill": "7.4.0", "@babel/standalone": "7.4.2", "babel-plugin-module-resolver-standalone": "0.0.1", + "lit-html": "^2.0.2", "requirejs": "^2.3.6" } }