From bd0eac331f53f703f83e72b29f95dbf1db0444c3 Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Wed, 19 Jun 2019 13:08:24 +0200 Subject: [PATCH 1/7] Release v0.5.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4222efa..7071108 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "flyps", - "version": "0.4.0", + "version": "0.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 73c4d12..390698f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "flyps", - "version": "0.4.0", + "version": "0.5.0", "description": "Flyps is just flyps.", "browser": "dist/flyps.umd.js", "module": "dist/flyps.esm.js", From b09e332a3bc604affbced32e9558bd2992729733 Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Tue, 25 Jun 2019 16:33:44 +0200 Subject: [PATCH 2/7] Add minimal hugo site --- site/config.toml | 5 + site/layouts/_default/baseof.html | 18 + site/layouts/example/list.html | 6 + site/layouts/example/single.html | 4 + site/layouts/index.html | 5 + site/layouts/partials/example-list.html | 4 + site/layouts/partials/example-single.html | 17 + site/layouts/partials/footer.html | 2 + site/layouts/partials/header.html | 7 + site/static/css/normalize.css | 424 ++++++++++++++++++++++ site/static/css/style.css | 108 ++++++ 11 files changed, 600 insertions(+) create mode 100644 site/config.toml create mode 100644 site/layouts/_default/baseof.html create mode 100644 site/layouts/example/list.html create mode 100644 site/layouts/example/single.html create mode 100644 site/layouts/index.html create mode 100644 site/layouts/partials/example-list.html create mode 100644 site/layouts/partials/example-single.html create mode 100644 site/layouts/partials/footer.html create mode 100644 site/layouts/partials/header.html create mode 100644 site/static/css/normalize.css create mode 100644 site/static/css/style.css diff --git a/site/config.toml b/site/config.toml new file mode 100644 index 0000000..3c7bfa0 --- /dev/null +++ b/site/config.toml @@ -0,0 +1,5 @@ +languageCode = "en-us" +title = "Flyps" +baseURL = "https://contargo.github.io/flyps" +pygmentsStyle = "friendly" +disableKinds = ["taxonomy", "RSS"] diff --git a/site/layouts/_default/baseof.html b/site/layouts/_default/baseof.html new file mode 100644 index 0000000..09d0e8a --- /dev/null +++ b/site/layouts/_default/baseof.html @@ -0,0 +1,18 @@ + + + + + + {{ .Title }} | {{ $.Site.Title }} + + + + + + {{ partial "header.html" . }} +
+ {{ block "main" . }}{{ end }} +
+ {{ partial "footer.html" . }} + + diff --git a/site/layouts/example/list.html b/site/layouts/example/list.html new file mode 100644 index 0000000..ae3cb3c --- /dev/null +++ b/site/layouts/example/list.html @@ -0,0 +1,6 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ partial "example-list.html" . }} +{{ end }} + diff --git a/site/layouts/example/single.html b/site/layouts/example/single.html new file mode 100644 index 0000000..3866ff8 --- /dev/null +++ b/site/layouts/example/single.html @@ -0,0 +1,4 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ partial "example-single.html" . }} +{{ end }} diff --git a/site/layouts/index.html b/site/layouts/index.html new file mode 100644 index 0000000..cce085f --- /dev/null +++ b/site/layouts/index.html @@ -0,0 +1,5 @@ +{{ define "main" }} +

{{ .Title }}

+ {{ .Content }} + {{ partial "example-list.html" . }} +{{ end }} diff --git a/site/layouts/partials/example-list.html b/site/layouts/partials/example-list.html new file mode 100644 index 0000000..cca4e49 --- /dev/null +++ b/site/layouts/partials/example-list.html @@ -0,0 +1,4 @@ +{{ range where .Pages.ByPublishDate "Section" "example" }} +

{{ .Title }}

+ {{ partial "example-single.html" . }} +{{ end }} diff --git a/site/layouts/partials/example-single.html b/site/layouts/partials/example-single.html new file mode 100644 index 0000000..a4c9cf0 --- /dev/null +++ b/site/layouts/partials/example-single.html @@ -0,0 +1,17 @@ +{{ $id := .File.ContentBaseName }} +
+ {{ .Content }} + + {{ range .Resources.Match "*.js" }} + {{ $example := strings.TrimSuffix ".js" .Name }} +
+ {{ highlight .Content "javascript" "" }} + + {{ end }} +
diff --git a/site/layouts/partials/footer.html b/site/layouts/partials/footer.html new file mode 100644 index 0000000..5e0ea02 --- /dev/null +++ b/site/layouts/partials/footer.html @@ -0,0 +1,2 @@ +
+
diff --git a/site/layouts/partials/header.html b/site/layouts/partials/header.html new file mode 100644 index 0000000..3876db0 --- /dev/null +++ b/site/layouts/partials/header.html @@ -0,0 +1,7 @@ +
+ +
diff --git a/site/static/css/normalize.css b/site/static/css/normalize.css new file mode 100644 index 0000000..30366a6 --- /dev/null +++ b/site/static/css/normalize.css @@ -0,0 +1,424 @@ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined for any HTML5 element in IE 8/9. + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox. + * Correct `block` display not defined for `main` in IE 11. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +menu, +nav, +section, +summary { + display: block; +} + +/** + * 1. Correct `inline-block` display not defined in IE 8/9. + * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. + */ + +audio, +canvas, +progress, +video { + display: inline-block; /* 1 */ + vertical-align: baseline; /* 2 */ +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9/10. + * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Address styling not present in IE 8/9/10/11, Safari, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9/10. + */ + +img { + border: 0; +} + +/** + * Correct overflow not hidden in IE 9/10/11. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* Grouping content + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari. + */ + +figure { + margin: 1em 40px; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + box-sizing: content-box; + height: 0; +} + +/** + * Contain overflow in all browsers. + */ + +pre { + overflow: auto; +} + +/** + * Address odd `em`-unit font size rendering in all browsers. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +/* Forms + ========================================================================== */ + +/** + * Known limitation: by default, Chrome and Safari on OS X allow very limited + * styling of `select`, unless a `border` property is set. + */ + +/** + * 1. Correct color not being inherited. + * Known issue: affects color of disabled elements. + * 2. Correct font properties not being inherited. + * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. + */ + +button, +input, +optgroup, +select, +textarea { + color: inherit; /* 1 */ + font: inherit; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address `overflow` set to `hidden` in IE 8/9/10/11. + */ + +button { + overflow: visible; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. + * Correct `select` style inheritance in Firefox. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +input { + line-height: normal; +} + +/** + * It's recommended that you don't attempt to style these elements. + * Firefox's implementation doesn't respect box-sizing, padding, or width. + * + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Fix the cursor style for Chrome's increment/decrement buttons. For certain + * `font-size` values of the `input`, it causes the cursor style of the + * decrement button to change from `default` to `text`. + */ + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari and Chrome on OS X. + * Safari (but not Chrome) clips the cancel button when the search input has + * padding (and `textfield` appearance). + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9/10/11. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Remove default vertical scrollbar in IE 8/9/10/11. + */ + +textarea { + overflow: auto; +} + +/** + * Don't inherit the `font-weight` (applied by a rule above). + * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. + */ + +optgroup { + font-weight: bold; +} + +/* Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} diff --git a/site/static/css/style.css b/site/static/css/style.css new file mode 100644 index 0000000..bd40d3b --- /dev/null +++ b/site/static/css/style.css @@ -0,0 +1,108 @@ +/* A64B00 */ +body { + background-color: #e2ddd5; + color: #555; + font-family: "sans-serif"; + font-size: 1em; +} + +h1, +h2, +h3 { + font-weight: normal; +} + +h1 { + font-size: 1.8em; +} + +h2 { + font-size: 1.4em; + margin: 3rem 0 1.5rem 0; +} + +h3 { + font-size: 1em; + font-weight: bold; +} + +p { + line-height: 1.5em; +} + +a { + color: #965; + border-bottom: 1px dotted #965; + text-decoration: none; +} +a:hover, +a:visited { + color: #777; + border-bottom-color: #777; +} + +main { + background-color: #ffffff; + box-shadow: 0px 0px 20px #00000015; + max-width: 80ch; + margin: 0 auto; + padding: 2rem 4em; +} + +header, +footer { + max-width: 80ch; + margin: 2rem auto; +} + +header ul { + list-style: none; + padding: 0; +} + +header ul > * { + display: inline-block; +} + +header ul > * + * { + padding-left: 2rem; +} + +.highlight, +.mount { + background-color: #f0f0f0; + margin: 0 -4rem; +} + +.highlight > pre { + padding: 1rem 4rem; + margin: 0; +} + +.mount > * { + padding: 1rem 4rem; + border-bottom: 5px solid #e5e5e5; +} + +.highlight > pre code { + display: block; + padding-bottom: 1rem; +} + +.highlight > pre:before, +.mount > *:before { + color: #bbb; + display: block; + font-family: monospace; + font-size: 1rem; + font-weight: bold; + margin: 1rem 0 2rem 0; +} + +.highlight > pre:before { + content: "Source"; +} + +.mount > *:before { + content: "Example"; +} From 8c691d8d4bc06dede31701ec0a0709241fdcf1bf Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Tue, 25 Jun 2019 16:34:17 +0200 Subject: [PATCH 3/7] Create bundle to run code examples --- site/index.js | 9 + site/package-lock.json | 626 +++++++++++++++++++++++++++++++++++++++++ site/package.json | 18 ++ site/rollup.config.js | 23 ++ 4 files changed, 676 insertions(+) create mode 100644 site/index.js create mode 100644 site/package-lock.json create mode 100644 site/package.json create mode 100644 site/rollup.config.js diff --git a/site/index.js b/site/index.js new file mode 100644 index 0000000..bdb329c --- /dev/null +++ b/site/index.js @@ -0,0 +1,9 @@ +import { signal, signalFn, withInputSignals } from "flyps"; +import { h, mount } from "flyps-dom-snabbdom"; + +window.signal = signal; +window.signalFn = signalFn; +window.withInputSignals = withInputSignals; + +window.h = h; +window.mount = mount; diff --git a/site/package-lock.json b/site/package-lock.json new file mode 100644 index 0000000..e3d5737 --- /dev/null +++ b/site/package-lock.json @@ -0,0 +1,626 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/core": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.4.5.tgz", + "integrity": "sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helpers": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.5", + "@babel/types": "^7.4.4", + "convert-source-map": "^1.1.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.11", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + } + }, + "@babel/generator": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.4.4.tgz", + "integrity": "sha512-53UOLK6TVNqKxf7RUh8NE851EHRxOOeVXKbK2bivdb+iziMyk03Sr4eaE9OELCbyZAAafAKPDwF2TPUES5QbxQ==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.11", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/helper-function-name": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz", + "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.0.0", + "@babel/template": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz", + "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-module-imports": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", + "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz", + "integrity": "sha512-Ro/XkzLf3JFITkW6b+hNxzZ1n5OQ80NvIUdmHspih1XAhtN3vPTuUFT4eQnela+2MaZ5ulH+iyP513KJrxbN7Q==", + "dev": true, + "requires": { + "@babel/types": "^7.4.4" + } + }, + "@babel/helpers": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.4.4.tgz", + "integrity": "sha512-igczbR/0SeuPR8RFfC7tGrbdTbFL3QTvH6D+Z6zNxnTe//GyqmtHmDkzrqDmyZ3eSwPqB/LhyKoU5DXsp+Vp2A==", + "dev": true, + "requires": { + "@babel/template": "^7.4.4", + "@babel/traverse": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.4.5.tgz", + "integrity": "sha512-9mUqkL1FF5T7f0WDFfAoDdiMVPWsdD1gZYzSnaXsxUCUqzuch/8of9G3VUSNiZmMBoRxT3neyVsqeiL/ZPcjew==", + "dev": true + }, + "@babel/template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz", + "integrity": "sha512-CiGzLN9KgAvgZsnivND7rkA+AeJ9JB0ciPOD4U59GKbQP2iQl+olF1l76kJOupqidozfZ32ghwBEJDhnk9MEcw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.4.4", + "@babel/types": "^7.4.4" + } + }, + "@babel/traverse": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.4.5.tgz", + "integrity": "sha512-Vc+qjynwkjRmIFGxy0KYoPj4FdVDxLej89kMHFsWScq999uX+pwcX4v9mWRjW0KcAYTPAuVQl2LKP1wEVLsp+A==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/generator": "^7.4.4", + "@babel/helper-function-name": "^7.1.0", + "@babel/helper-split-export-declaration": "^7.4.4", + "@babel/parser": "^7.4.5", + "@babel/types": "^7.4.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.11" + } + }, + "@babel/types": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.4.4.tgz", + "integrity": "sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.11", + "to-fast-properties": "^2.0.0" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "@types/node": { + "version": "12.0.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.8.tgz", + "integrity": "sha512-b8bbUOTwzIY3V5vDTY1fIJ+ePKDUBqt2hC2woVGotdQQhG/2Sh62HOKHrT7ab+VerXAcPyAiTEipPu/FsreUtg==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "dev": true + }, + "flyps": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/flyps/-/flyps-0.4.0.tgz", + "integrity": "sha512-yb49qn3FcOEPRxrfgZcP4vQh5nBmeqtXWnZ/koSbpC0CjP6JVdMZLUnKUNWHj1m577OSxA7b65ykMXCa6UBa1g==" + }, + "flyps-dom-snabbdom": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/flyps-dom-snabbdom/-/flyps-dom-snabbdom-0.1.2.tgz", + "integrity": "sha512-9IRuI9ANaD/JogtdDbpUU9aTBfrt0qoCdwINRVZtpQ/djSFRqmJ9GmCBBVwB2IuNiNVT7PiJ238J6zitwTjgsA==", + "requires": { + "flyps": "^0.4.0", + "snabbdom": "^0.7.3" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", + "dev": true + }, + "is-reference": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.2.tgz", + "integrity": "sha512-Kn5g8c7XHKejFOpTf2QN9YjiHHKl5xRj+2uAZf9iM2//nkBNi/NNeB5JMoun28nEaUVHyPUzqzhfRlfAirEjXg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "jest-worker": { + "version": "24.6.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", + "integrity": "sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==", + "dev": true, + "requires": { + "merge-stream": "^1.0.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json5": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "magic-string": { + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.2.tgz", + "integrity": "sha512-iLs9mPjh9IuTtRsqqhNGYcZXGei0Nh/A4xirrsqW7c+QhKVFL2vm7U09ru6cHRD22azaP/wMDgI+HCqbETMTtg==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "resolve": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", + "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "rollup": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.15.6.tgz", + "integrity": "sha512-s3Vn3QJQ5YVFfIG4nXoG9VdL1I37IZsft+4ZyeBhxE0df1kCFz9e+4bEAbR4mKH3pvBO9e9xjdxWPhhIp0r9ow==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "@types/node": "^12.0.8", + "acorn": "^6.1.1" + } + }, + "rollup-plugin-babel": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.2.tgz", + "integrity": "sha512-KfnizE258L/4enADKX61ozfwGHoqYauvoofghFJBhFnpH9Sb9dNPpWg8QHOaAfVASUYV8w0mCx430i9z0LJoJg==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.0.0", + "rollup-pluginutils": "^2.3.0" + } + }, + "rollup-plugin-commonjs": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.0.0.tgz", + "integrity": "sha512-B8MoX5GRpj3kW4+YaFO/di2JsZkBxNjVmZ9LWjUoTAjq8N9wc7HObMXPsrvolVV9JXVtYSscflXM14A19dXPNQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.0", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.10.1", + "rollup-pluginutils": "^2.7.0" + } + }, + "rollup-plugin-node-resolve": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.0.3.tgz", + "integrity": "sha512-Mhhmf0x493xgUPEsRELnU1VM+4+WO82knWkAbZ0d2DvZQZJMbhzyQK/hqtpVscoRru1EqlK3TM1kK9ro469wPw==", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.0" + } + }, + "rollup-plugin-terser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.0.0.tgz", + "integrity": "sha512-W+jJ4opYnlmNyVW0vtRufs+EGf68BIJ7bnOazgz8mgz8pA9lUyrEifAhPs5y9M16wFeAyBGaRjKip4dnFBtXaw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "jest-worker": "^24.6.0", + "serialize-javascript": "^1.7.0", + "terser": "^4.0.0" + } + }, + "rollup-pluginutils": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", + "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "serialize-javascript": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", + "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", + "dev": true + }, + "snabbdom": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/snabbdom/-/snabbdom-0.7.3.tgz", + "integrity": "sha512-XNh90GQiV36hWdfSL46fIVrSSvmBuZlWk3++qaEgBeQWQJCqTphcbjTODPv8/vyZHJaB3VhePsWfGxi/zBxXyw==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-support": { + "version": "0.5.12", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", + "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "sourcemap-codec": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.4.tgz", + "integrity": "sha512-CYAPYdBu34781kLHkaW3m6b/uUSyMOC2R61gcYMWooeuaGtjof86ZA/8T+qVPPt7np1085CR9hmMGrySwEc8Xg==", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "terser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.0.0.tgz", + "integrity": "sha512-dOapGTU0hETFl1tCo4t56FN+2jffoKyER9qBGoUFyZ6y7WLoKT0bF+lAYi6B6YsILcGF3q1C2FBh8QcKSCgkgA==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.10" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + } + } +} diff --git a/site/package.json b/site/package.json new file mode 100644 index 0000000..95b9054 --- /dev/null +++ b/site/package.json @@ -0,0 +1,18 @@ +{ + "dependencies": { + "flyps": "^0.4.0", + "flyps-dom-snabbdom": "^0.1.2" + }, + "devDependencies": { + "@babel/core": "^7.4.5", + "ncp": "^2.0.0", + "rollup": "^1.15.6", + "rollup-plugin-babel": "^4.3.2", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-node-resolve": "^5.0.3", + "rollup-plugin-terser": "^5.0.0" + }, + "scripts": { + "build": "rollup -c" + } +} diff --git a/site/rollup.config.js b/site/rollup.config.js new file mode 100644 index 0000000..40fdf0d --- /dev/null +++ b/site/rollup.config.js @@ -0,0 +1,23 @@ +import babel from "rollup-plugin-babel"; +import resolve from "rollup-plugin-node-resolve"; +import commonjs from "rollup-plugin-commonjs"; +import { terser } from "rollup-plugin-terser"; + +let commonPlugins = [ + resolve({ + dedupe: ["flyps"], + }), + commonjs(), + babel({ exclude: "node_modules/**" }), + terser(), +]; + +export default [{ + input: "index.js", + output: { + file: "static/js/bundle.js", + format: "umd", + name: "bundle", + }, + plugins: commonPlugins, +}]; From 3790d7bd7972c67710ecfc9f7224e296f409e576 Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Tue, 25 Jun 2019 16:37:32 +0200 Subject: [PATCH 4/7] Add code examples to hugo site --- site/content/_index.md | 8 ++ site/content/example/bmi/bmi.js | 78 +++++++++++++++++++ site/content/example/bmi/index.md | 6 ++ site/content/example/clock/clock.js | 22 ++++++ site/content/example/clock/index.md | 6 ++ site/content/example/counter/counter.js | 19 +++++ site/content/example/counter/index.md | 6 ++ site/content/example/list/index.md | 6 ++ site/content/example/list/list.js | 14 ++++ site/content/example/simple-parent/index.md | 6 ++ .../example/simple-parent/simple-parent.js | 21 +++++ site/content/example/simple/index.md | 6 ++ site/content/example/simple/simple.js | 14 ++++ 13 files changed, 212 insertions(+) create mode 100644 site/content/_index.md create mode 100644 site/content/example/bmi/bmi.js create mode 100644 site/content/example/bmi/index.md create mode 100644 site/content/example/clock/clock.js create mode 100644 site/content/example/clock/index.md create mode 100644 site/content/example/counter/counter.js create mode 100644 site/content/example/counter/index.md create mode 100644 site/content/example/list/index.md create mode 100644 site/content/example/list/list.js create mode 100644 site/content/example/simple-parent/index.md create mode 100644 site/content/example/simple-parent/simple-parent.js create mode 100644 site/content/example/simple/index.md create mode 100644 site/content/example/simple/simple.js diff --git a/site/content/_index.md b/site/content/_index.md new file mode 100644 index 0000000..1f8294e --- /dev/null +++ b/site/content/_index.md @@ -0,0 +1,8 @@ +--- +title: "Flyps" +date: 2019-06-18T10:00:00+02:00 +--- + +Woha, what's this. This is the new home for the Flyps project. We're just starting out, but make sure to come by again for an update. + +For now, here are some examples. diff --git a/site/content/example/bmi/bmi.js b/site/content/example/bmi/bmi.js new file mode 100644 index 0000000..d888eb4 --- /dev/null +++ b/site/content/example/bmi/bmi.js @@ -0,0 +1,78 @@ +let data = signal({ height: 1.8, weight: 78 }); + +let bmi = signalFn( + withInputSignals( + () => data, + ({ height, weight }) => weight / (height * height) + ) +); + +let diagnose = signalFn( + withInputSignals( + () => bmi, + bmi => { + if (bmi < 18.5) return "underweight"; + if (bmi < 25) return "healthy"; + if (bmi < 30) return "overweight"; + return "obese"; + } + ) +); + +let color = signalFn( + withInputSignals( + () => diagnose, + diagnose => { + switch (diagnose) { + case "underweight": + case "overweight": + return "orange"; + case "healthy": + return "green"; + default: + return "red"; + } + } + ) +); + +function slider(key, value, min, max, step = 1) { + return h("input", { + attrs: { + type: "range", + value, + min, + max, + step + }, + style: { width: "100%" }, + on: { + input: function(e) { + data.update(data => ({ + ...data, + [key]: e.target.value + })); + } + } + }); +} + +function calculator([data, bmi, diagnose, color]) { + let { height, weight } = data; + + return h("div.bmi", [ + h("h3", "BMI calculator"), + h("div", [`Height: ${height}m`, slider("height", height, 1.0, 2.2, 0.01)]), + h("div", [`Weight: ${weight}kg`, slider("weight", weight, 30, 200)]), + h("p", [ + `BMI: ${Math.round(bmi)}`, + " - ", + h("strong", { style: { color: color } }, diagnose) + ]) + ]); +} + +mount( + mountPoint, + withInputSignals(() => [data, bmi, diagnose, color], calculator) +); diff --git a/site/content/example/bmi/index.md b/site/content/example/bmi/index.md new file mode 100644 index 0000000..90e9154 --- /dev/null +++ b/site/content/example/bmi/index.md @@ -0,0 +1,6 @@ +--- +title: "BMI calculator" +date: 2019-06-25T10:00:00+02:00 +resources: + - src: bmi.js +--- diff --git a/site/content/example/clock/clock.js b/site/content/example/clock/clock.js new file mode 100644 index 0000000..d7ddf2e --- /dev/null +++ b/site/content/example/clock/clock.js @@ -0,0 +1,22 @@ +let color = signal("#000"); +let now = signal(new Date()); + +setInterval(() => now.reset(new Date()), 1000); + +function display() { + let time = now.value().toTimeString().split(" ")[0]; + return h("h1", { style: { color: color.value() } }, time); +} + +function colorInput() { + return h("input", { + attrs: { type: "color", value: color.value() }, + on: { input: e => color.reset(e.target.value) }, + }); +} + +function clock() { + return h("div.clock", [display(), colorInput()]); +} + +mount(mountPoint, clock); diff --git a/site/content/example/clock/index.md b/site/content/example/clock/index.md new file mode 100644 index 0000000..f2f17f1 --- /dev/null +++ b/site/content/example/clock/index.md @@ -0,0 +1,6 @@ +--- +title: "Clock" +date: 2019-06-24T10:00:00+02:00 +resources: + - src: clock.js +--- diff --git a/site/content/example/counter/counter.js b/site/content/example/counter/counter.js new file mode 100644 index 0000000..c70cf96 --- /dev/null +++ b/site/content/example/counter/counter.js @@ -0,0 +1,19 @@ +let count = signal(0); + +signal({ height: 180, weight: 80 }); +function counter() { + return h("div.counter", [ + "Number of clicks: ", + count.value(), + h( + "button", + { + style: { margin: "10px" }, + on: { click: () => count.update(count => count + 1) } + }, + "Click!" + ) + ]); +} + +mount(mountPoint, counter); diff --git a/site/content/example/counter/index.md b/site/content/example/counter/index.md new file mode 100644 index 0000000..5a02bfc --- /dev/null +++ b/site/content/example/counter/index.md @@ -0,0 +1,6 @@ +--- +title: "Counter" +date: 2019-06-21T10:00:00+02:00 +resources: + - src: counter.js +--- diff --git a/site/content/example/list/index.md b/site/content/example/list/index.md new file mode 100644 index 0000000..83d4198 --- /dev/null +++ b/site/content/example/list/index.md @@ -0,0 +1,6 @@ +--- +title: "List" +date: 2019-06-20T10:00:00+02:00 +resources: + - src: list.js +--- diff --git a/site/content/example/list/list.js b/site/content/example/list/list.js new file mode 100644 index 0000000..654183a --- /dev/null +++ b/site/content/example/list/list.js @@ -0,0 +1,14 @@ +function list(items) { + return h("ul", items.map( + item => h("li", `Item ${item}`) + )); +} + +function numberList() { + return h("div", [ + "Here is a list of numbers:", + list([1,2,3]) + ]); +} + +mount(mountPoint, numberList); diff --git a/site/content/example/simple-parent/index.md b/site/content/example/simple-parent/index.md new file mode 100644 index 0000000..b3eae8c --- /dev/null +++ b/site/content/example/simple-parent/index.md @@ -0,0 +1,6 @@ +--- +title: "Simple Parent" +date: 2019-06-19T14:00:00+02:00 +resources: + - src: simple-parent.js +--- diff --git a/site/content/example/simple-parent/simple-parent.js b/site/content/example/simple-parent/simple-parent.js new file mode 100644 index 0000000..0758953 --- /dev/null +++ b/site/content/example/simple-parent/simple-parent.js @@ -0,0 +1,21 @@ +function simple() { + return h("div", [ + h("p", "I am a simple view!"), + h("p.special", [ + "I render text ", + h("strong", "bold"), + " and ", + h("span", { style: { color: "red" } }, "red"), + "." + ]) + ]); +} + +function parent() { + return h("div", [ + h("p", "I'm the parent of the simple view"), + simple() + ]); +} + +mount(mountPoint, parent); diff --git a/site/content/example/simple/index.md b/site/content/example/simple/index.md new file mode 100644 index 0000000..0720635 --- /dev/null +++ b/site/content/example/simple/index.md @@ -0,0 +1,6 @@ +--- +title: "Simple" +date: 2019-06-19T10:00:00+02:00 +resources: + - src: simple.js +--- diff --git a/site/content/example/simple/simple.js b/site/content/example/simple/simple.js new file mode 100644 index 0000000..c016e44 --- /dev/null +++ b/site/content/example/simple/simple.js @@ -0,0 +1,14 @@ +function simple() { + return h("div", [ + h("p", "I am a simple view!"), + h("p.special", [ + "I render text ", + h("strong", "bold"), + " and ", + h("span", { style: { color: "red" } }, "red"), + "." + ]) + ]); +} + +mount(mountPoint, simple); From bb8057638a4007d2a826b00dfcc4f4ecd83df529 Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Tue, 25 Jun 2019 16:37:52 +0200 Subject: [PATCH 5/7] Add Makefile to build hugo site --- site/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 site/Makefile diff --git a/site/Makefile b/site/Makefile new file mode 100644 index 0000000..b0898e4 --- /dev/null +++ b/site/Makefile @@ -0,0 +1,17 @@ +.PHONY: all js + +all: js site + +js: static/js/bundle.js + +static/js/bundle.js: index.js node_modules + npm run build + +node_modules: package.json + npm install + +site: + hugo + +clean: + rm -rf static/js/bundle.js resources From ff604ff24da2a4a8bac59ec42c6886cf3640a225 Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Tue, 25 Jun 2019 16:38:23 +0200 Subject: [PATCH 6/7] Ignore generated site resources --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 9ebfc2d..4d46d55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ node_modules/ dist/ coverage/ +site/public +site/resources +site/static/js/bundle.js From 2e3ff89f097576c0c4d010036eb07903fa940621 Mon Sep 17 00:00:00 2001 From: Stefan Wagner Date: Tue, 25 Jun 2019 16:38:55 +0200 Subject: [PATCH 7/7] Add make target to build hugo site --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index fe4f520..31d4999 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SOURCES=$(shell find src -name "*.js") .PHONY: all clean coverage lint test major-version minor-version patch-version \ - publish + publish site all: dist/flyps.js @@ -29,5 +29,8 @@ patch-version: publish: npm publish +site: + make -C site + clean: rm -f dist/*