Browse Source

Switch to local htm/preact compiled with snowpack

pull/26/head
Tulir Asokan 4 years ago
parent
commit
bdf4222c61
  1. 3
      .gitignore
  2. 2
      web/index.html
  3. 2
      web/index.js
  4. 7
      web/lib/htm/preact.js
  5. 31
      web/package.json
  6. 2533
      web/yarn.lock

3
.gitignore

@ -5,8 +5,11 @@
*.pyc
__pycache__
node_modules
*.session
*.json
!example-config.json
!packs/*.json
!web/package.json
*.bak

2
web/index.html

@ -8,7 +8,7 @@
<link rel="modulepreload" href="./widget-api.js"/>
<link rel="modulepreload" href="./frequently-used.js"/>
<link rel="modulepreload" href="./spinner.js"/>
<link rel="modulepreload" href="https://unpkg.com/htm/preact/index.mjs?module"/>
<link rel="modulepreload" href="./lib/htm/preact.js"/>
<link rel="preload" href="packs/index.json" as="fetch" type="application/json" crossorigin/>
<link rel="stylesheet" href="index.css"/>

2
web/index.js

@ -3,7 +3,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
import { html, render, Component } from "https://unpkg.com/htm/preact/index.mjs?module"
import { html, render, Component } from "./lib/htm/preact.js"
import { Spinner } from "./spinner.js"
import * as widgetAPI from "./widget-api.js"
import * as frequent from "./frequently-used.js"

7
web/lib/htm/preact.js
File diff suppressed because it is too large
View File

31
web/package.json

@ -0,0 +1,31 @@
{
"name": "maunium-stickerpicker",
"version": "0.1.0",
"description": "A fast and simple Matrix sticker picker widget",
"repository": "https://github.com/maunium/stickerpicker",
"author": "Tulir Asokan <tulir@maunium.net>",
"license": "MPL-2.0",
"private": true,
"scripts": {
"snowpack": "snowpack",
"sass": "node-sass -o . *.sass"
},
"snowpack": {
"install": [
"htm/preact"
],
"installOptions": {
"sourceMap": false,
"dest": "lib",
"treeshake": true
}
},
"dependencies": {
"htm": "^3.0.4",
"preact": "^10.4.8",
"snowpack": "^2.10.3"
},
"devDependencies": {
"node-sass": "^4.14.1"
}
}

2533
web/yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save