1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-10 11:35:52 +01:00

chore: Remove support for deprecated Excalidraw for Desktop (#2465)

This commit is contained in:
Lipis 2020-12-18 14:02:29 +02:00 committed by GitHub
parent fb582b45db
commit 10e07e434c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 38 deletions

27
package-lock.json generated

@ -4276,27 +4276,6 @@
"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
}, },
"asar": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz",
"integrity": "sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw==",
"dev": true,
"requires": {
"@types/glob": "^7.1.1",
"chromium-pickle-js": "^0.2.0",
"commander": "^5.0.0",
"glob": "^7.1.6",
"minimatch": "^3.0.4"
},
"dependencies": {
"commander": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-5.0.0.tgz",
"integrity": "sha512-JrDGPAKjMGSP1G0DUoaceEJ3DZgAfr/q6X7FVk4+U5KxUSKviYGM2k6zWkfyyBHy5rAtzgYJFa1ro2O9PtoxwQ==",
"dev": true
}
}
},
"asn1": { "asn1": {
"version": "0.2.4", "version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@ -5699,12 +5678,6 @@
"tslib": "^1.9.0" "tslib": "^1.9.0"
} }
}, },
"chromium-pickle-js": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz",
"integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=",
"dev": true
},
"ci-info": { "ci-info": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",

@ -52,7 +52,6 @@
"devDependencies": { "devDependencies": {
"@types/lodash.throttle": "4.1.6", "@types/lodash.throttle": "4.1.6",
"@types/pako": "1.0.1", "@types/pako": "1.0.1",
"asar": "3.0.3",
"eslint-config-prettier": "7.0.0", "eslint-config-prettier": "7.0.0",
"eslint-plugin-prettier": "3.3.0", "eslint-plugin-prettier": "3.3.0",
"firebase-tools": "8.19.0", "firebase-tools": "8.19.0",
@ -84,8 +83,8 @@
"build-node": "node ./scripts/build-node.js", "build-node": "node ./scripts/build-node.js",
"build:app:docker": "REACT_APP_INCLUDE_GTAG=false REACT_APP_DISABLE_SENTRY=true react-scripts build", "build:app:docker": "REACT_APP_INCLUDE_GTAG=false REACT_APP_DISABLE_SENTRY=true react-scripts build",
"build:app": "REACT_APP_INCLUDE_GTAG=true REACT_APP_GIT_SHA=$NOW_GITHUB_COMMIT_SHA react-scripts build", "build:app": "REACT_APP_INCLUDE_GTAG=true REACT_APP_GIT_SHA=$NOW_GITHUB_COMMIT_SHA react-scripts build",
"build:zip": "node ./scripts/build-version.js", "build:version": "node ./scripts/build-version.js",
"build": "npm run build:app && npm run build:zip", "build": "npm run build:app && npm run build:version",
"eject": "react-scripts eject", "eject": "react-scripts eject",
"fix:code": "npm run test:code -- --fix", "fix:code": "npm run test:code -- --fix",
"fix:other": "npm run prettier -- --write", "fix:other": "npm run prettier -- --write",

@ -55,6 +55,8 @@
<meta name="twitter:image" content="https://excalidraw.com/og-image.png" /> <meta name="twitter:image" content="https://excalidraw.com/og-image.png" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<!-- Excalidraw version -->
<meta name="version" content="{version}" />
<link <link
rel="preload" rel="preload"
href="FG_Virgil.woff2" href="FG_Virgil.woff2"

@ -2,7 +2,8 @@
const fs = require("fs"); const fs = require("fs");
const path = require("path"); const path = require("path");
const asar = require("asar"); const versionFile = path.join("build", "version.json");
const indexFile = path.join("build", "index.html");
const zero = (digit) => `0${digit}`.slice(-2); const zero = (digit) => `0${digit}`.slice(-2);
@ -20,18 +21,24 @@ const now = new Date();
const data = JSON.stringify( const data = JSON.stringify(
{ {
asar: "excalidraw.asar",
version: versionDate(now), version: versionDate(now),
}, },
undefined, undefined,
2, 2,
); );
fs.writeFileSync(path.join("build", "version.json"), data); fs.writeFileSync(versionFile, data);
(async () => { // https://stackoverflow.com/a/14181136/8418
const src = "build/"; fs.readFile(indexFile, "utf8", (error, data) => {
const dest = path.join("build", `excalidraw.asar`); if (error) {
return console.error(error);
}
const result = data.replace(/{version}/g, versionDate(now));
await asar.createPackage(src, dest); fs.writeFile(indexFile, result, "utf8", (error) => {
})(); if (error) {
return console.error(error);
}
});
});