Add instance config with env variable
This commit is contained in:
parent
77d74bc76d
commit
cc29cea895
270
package-lock.json
generated
270
package-lock.json
generated
@ -29,6 +29,7 @@
|
||||
"parcel-plugin-static-files-copy": "^2.3.1",
|
||||
"parcel-plugin-svelte": "^4.0.5",
|
||||
"postcss-input-range": "^4.0.0",
|
||||
"posthtml-expressions": "^1.9.0",
|
||||
"sass": "^1.25.0",
|
||||
"svelte": "^3.18.2",
|
||||
"typescript": "^3.8.2"
|
||||
@ -4490,6 +4491,12 @@
|
||||
"integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fclone": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz",
|
||||
"integrity": "sha1-EOhdo4v+p/xZk0HClu4ddyZu5kA=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
@ -5458,6 +5465,12 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-json": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz",
|
||||
"integrity": "sha1-a+Fm0USCihMdaGiRuYPfYsOUkf8=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/is-number": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
|
||||
@ -7553,6 +7566,149 @@
|
||||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-expressions/-/posthtml-expressions-1.9.0.tgz",
|
||||
"integrity": "sha512-jf4BsY2Pw6AoBFQTklOkf+dDhq+kO+R80Dj/plPY/IpZ6sXondzp1O55wJiQK2vIUL4XSAqKdG97wE/j8EH2og==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fclone": "^1.0.11",
|
||||
"posthtml-match-helper": "^1.0.1",
|
||||
"posthtml-parser": "^0.10.0",
|
||||
"posthtml-render": "^3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/dom-serializer": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz",
|
||||
"integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"domhandler": "^4.2.0",
|
||||
"entities": "^2.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/dom-serializer/node_modules/entities": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
|
||||
"integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/domelementtype": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
|
||||
"integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/domhandler": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz",
|
||||
"integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/domhandler?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/domutils": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
|
||||
"integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"dom-serializer": "^1.0.1",
|
||||
"domelementtype": "^2.2.0",
|
||||
"domhandler": "^4.2.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/domutils?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/entities": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
||||
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/fb55/entities?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/htmlparser2": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.1.2.tgz",
|
||||
"integrity": "sha512-d6cqsbJba2nRdg8WW2okyD4ceonFHn9jLFxhwlNcLhQWcFPdxXeJulgOLjLKtAK9T6ahd+GQNZwG9fjmGW7lyg==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
"https://github.com/fb55/htmlparser2?sponsor=1",
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fb55"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"domhandler": "^4.2.2",
|
||||
"domutils": "^2.8.0",
|
||||
"entities": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/posthtml-parser": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.1.tgz",
|
||||
"integrity": "sha512-i7w2QEHqiGtsvNNPty0Mt/+ERch7wkgnFh3+JnBI2VgDbGlBqKW9eDVd3ENUhE1ujGFe3e3E/odf7eKhvLUyDg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"htmlparser2": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-expressions/node_modules/posthtml-render": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz",
|
||||
"integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-json": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-match-helper": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-match-helper/-/posthtml-match-helper-1.0.1.tgz",
|
||||
"integrity": "sha1-RRJT3o5YRKNI6WOtXt13aesSlRM=",
|
||||
"dev": true,
|
||||
"peerDependencies": {
|
||||
"posthtml": ">=0.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/posthtml-parser": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.4.2.tgz",
|
||||
@ -13256,6 +13412,12 @@
|
||||
"integrity": "sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==",
|
||||
"dev": true
|
||||
},
|
||||
"fclone": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz",
|
||||
"integrity": "sha1-EOhdo4v+p/xZk0HClu4ddyZu5kA=",
|
||||
"dev": true
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
@ -14025,6 +14187,12 @@
|
||||
"html-tags": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"is-json": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz",
|
||||
"integrity": "sha1-a+Fm0USCihMdaGiRuYPfYsOUkf8=",
|
||||
"dev": true
|
||||
},
|
||||
"is-number": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
|
||||
@ -15792,6 +15960,108 @@
|
||||
"posthtml-render": "^1.1.5"
|
||||
}
|
||||
},
|
||||
"posthtml-expressions": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-expressions/-/posthtml-expressions-1.9.0.tgz",
|
||||
"integrity": "sha512-jf4BsY2Pw6AoBFQTklOkf+dDhq+kO+R80Dj/plPY/IpZ6sXondzp1O55wJiQK2vIUL4XSAqKdG97wE/j8EH2og==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fclone": "^1.0.11",
|
||||
"posthtml-match-helper": "^1.0.1",
|
||||
"posthtml-parser": "^0.10.0",
|
||||
"posthtml-render": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"dom-serializer": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz",
|
||||
"integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"domhandler": "^4.2.0",
|
||||
"entities": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"entities": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
|
||||
"integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"domelementtype": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
|
||||
"integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
|
||||
"dev": true
|
||||
},
|
||||
"domhandler": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.2.tgz",
|
||||
"integrity": "sha512-PzE9aBMsdZO8TK4BnuJwH0QT41wgMbRzuZrHUcpYncEjmQazq8QEaBWgLG7ZyC/DAZKEgglpIA6j4Qn/HmxS3w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"domelementtype": "^2.2.0"
|
||||
}
|
||||
},
|
||||
"domutils": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
|
||||
"integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"dom-serializer": "^1.0.1",
|
||||
"domelementtype": "^2.2.0",
|
||||
"domhandler": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz",
|
||||
"integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==",
|
||||
"dev": true
|
||||
},
|
||||
"htmlparser2": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.1.2.tgz",
|
||||
"integrity": "sha512-d6cqsbJba2nRdg8WW2okyD4ceonFHn9jLFxhwlNcLhQWcFPdxXeJulgOLjLKtAK9T6ahd+GQNZwG9fjmGW7lyg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"domhandler": "^4.2.2",
|
||||
"domutils": "^2.8.0",
|
||||
"entities": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"posthtml-parser": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.10.1.tgz",
|
||||
"integrity": "sha512-i7w2QEHqiGtsvNNPty0Mt/+ERch7wkgnFh3+JnBI2VgDbGlBqKW9eDVd3ENUhE1ujGFe3e3E/odf7eKhvLUyDg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"htmlparser2": "^7.1.1"
|
||||
}
|
||||
},
|
||||
"posthtml-render": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz",
|
||||
"integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-json": "^2.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"posthtml-match-helper": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-match-helper/-/posthtml-match-helper-1.0.1.tgz",
|
||||
"integrity": "sha1-RRJT3o5YRKNI6WOtXt13aesSlRM=",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"posthtml-parser": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.4.2.tgz",
|
||||
|
@ -19,6 +19,7 @@
|
||||
"parcel-plugin-static-files-copy": "^2.3.1",
|
||||
"parcel-plugin-svelte": "^4.0.5",
|
||||
"postcss-input-range": "^4.0.0",
|
||||
"posthtml-expressions": "^1.9.0",
|
||||
"sass": "^1.25.0",
|
||||
"svelte": "^3.18.2",
|
||||
"typescript": "^3.8.2"
|
||||
|
9
posthtml.config.js
Normal file
9
posthtml.config.js
Normal file
@ -0,0 +1,9 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
"posthtml-expressions": {
|
||||
locals: {
|
||||
INSTANCE: process.env.INSTANCE
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
@ -34,7 +34,7 @@
|
||||
|
||||
const cache = new DeepSet()
|
||||
|
||||
const domain = writableStorage(localStorage, 'domain', 'eldritch.cafe')
|
||||
const domain = writableStorage(localStorage, 'domain', window.instance || 'eldritch.cafe')
|
||||
|
||||
const hashtags = writableStorage(localStorage, 'hashtags', [
|
||||
'np',
|
||||
|
@ -17,6 +17,11 @@
|
||||
<meta name="theme-color" content="#635776">
|
||||
</head>
|
||||
<body>
|
||||
<if condition="INSTANCE">
|
||||
<script>
|
||||
window.instance = '{{ INSTANCE }}';
|
||||
</script>
|
||||
</if>
|
||||
<script src="main.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user