Switch to local htm/preact compiled with snowpack

This commit is contained in:
Tulir Asokan 2020-09-10 16:08:10 +03:00
parent 05a6e046c2
commit bdf4222c61
6 changed files with 2576 additions and 2 deletions

3
.gitignore vendored
View File

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

View File

@ -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"/>

View File

@ -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 Normal file

File diff suppressed because one or more lines are too long

31
web/package.json Normal file
View File

@ -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 Normal file

File diff suppressed because it is too large Load Diff