Moved twemoji outside /public
Now only the twemoji resources are copied to public at build time, that way we arent shipping any of the twemoji source as well
This commit is contained in:
parent
7ed9567b8f
commit
4aeb0b193b
4 changed files with 10 additions and 4 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
||||||
[submodule "public/res/twemoji"]
|
[submodule "deps/twemoji"]
|
||||||
path = public/res/twemoji
|
path = deps/twemoji
|
||||||
url = https://github.com/twitter/twemoji.git
|
url = https://github.com/twitter/twemoji.git
|
||||||
|
|
0
public/res/twemoji → deps/twemoji
vendored
0
public/res/twemoji → deps/twemoji
vendored
|
@ -8,11 +8,13 @@ import { sanitizeText } from './sanitize';
|
||||||
|
|
||||||
const Math = lazy(() => import('../app/atoms/math/Math'));
|
const Math = lazy(() => import('../app/atoms/math/Math'));
|
||||||
|
|
||||||
const CDN_LOCAL = "/public/res/twemoji/assets/"
|
const CDN_LOCAL = "/public/twemoji/assets/"
|
||||||
const CDN_EXTERNAL = "https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/";
|
const CDN_EXTERNAL = "https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/";
|
||||||
|
|
||||||
|
var use_local = false;
|
||||||
|
|
||||||
export const GetTwemojiCDN = () => {
|
export const GetTwemojiCDN = () => {
|
||||||
if(window.__TAURI__){
|
if(window.__TAURI__ || use_local){
|
||||||
return CDN_LOCAL
|
return CDN_LOCAL
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
|
@ -20,6 +20,10 @@ const copyFiles = {
|
||||||
{
|
{
|
||||||
src: 'public/res/android',
|
src: 'public/res/android',
|
||||||
dest: 'public/',
|
dest: 'public/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
src: 'deps/twemoji/assets',
|
||||||
|
dest: 'public/twemoji'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue