Skip to content

Commit 76f426e

Browse files
basic model init procedure working
1 parent f93ce63 commit 76f426e

10 files changed

+15265
-5506
lines changed

fontoxpath.rollup.config.js

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import commonjs from 'plugin-commonjs'
2+
3+
export default {
4+
input: './node_modules/fontoxpath/dist/fontoxpath.js',
5+
output: {
6+
file: './assets/fontoxpath.esm.js',
7+
format: 'es',
8+
},
9+
plugins: [
10+
commonjs({
11+
namedExports: {
12+
'fontoxpath': ['fontoxpath']
13+
}
14+
})
15+
],
16+
}

hello-fonto.html

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="utf-8"/>
4+
<meta content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes" name="viewport"/>
5+
6+
<title>Hello World</title>
7+
8+
<script src="../../assets/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
9+
<script type="module">
10+
import './src/xf-form.js';
11+
import './src/xf-model.js';
12+
import './src/xf-instance.js';
13+
import './src/xf-bind.js';
14+
import './src/xf-output.js';
15+
import './src/xf-message.js';
16+
import * as fontoxpath from '../output/fontoxpath.js';
17+
18+
</script>
19+
20+
<script type="application/javascript">
21+
22+
</script>
23+
<style>
24+
</style>
25+
</head>
26+
<body unresolved="unresolved">
27+
28+
29+
<xf-form>
30+
<xf-model id="model1">
31+
<xf-instance>
32+
<data>
33+
<greeting>World!</greeting>
34+
</data>
35+
</xf-instance>
36+
<xf-instance id="second">
37+
<data>
38+
<outro>GoodBye</outro>
39+
</data>
40+
</xf-instance>
41+
<xf-bind id="b-greeting" ref="greeting" required="true()"></xf-bind>
42+
43+
<!--
44+
<xf-message event="model-construct-done">Hey it's done</xf-message>
45+
<xf-message event="ready">Hey it's ready</xf-message>
46+
-->
47+
</xf-model>
48+
49+
<!-- <xf-model id="model2"></xf-model>-->
50+
51+
52+
<!--
53+
<xf-message event="value-changed">value has changed</xf-message>
54+
<xf-message event="refresh-done">refresh has been done </xf-message>
55+
-->
56+
57+
<h1>
58+
<xf-output ref="/data/greeting" id="output"></xf-output>
59+
</h1>
60+
61+
<!--
62+
<h1>
63+
<xf-output bind="b-greeting" id="output"></xf-output>
64+
</h1>
65+
-->
66+
67+
<!--
68+
<xf-button label="say 'hello World'">
69+
<xf-setvalue bind="b-greeting" value="Hello World!"></xf-setvalue>
70+
</xf-button>
71+
<xf-button label="submit">
72+
<xf-submit></xf-submit>
73+
</xf-button>
74+
-->
75+
</xf-form>
76+
</body>
77+
</html>

0 commit comments

Comments
 (0)