Remove rimraf (#32618)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -252,7 +252,6 @@
|
||||
"prettier": "3.8.1",
|
||||
"process": "^0.11.10",
|
||||
"raw-loader": "^4.0.2",
|
||||
"rimraf": "^6.0.0",
|
||||
"semver": "^7.5.2",
|
||||
"source-map-loader": "^5.0.0",
|
||||
"stylelint": "^17.0.0",
|
||||
|
||||
Generated
+4
-7
@@ -232,7 +232,7 @@ importers:
|
||||
version: 1.0.3
|
||||
matrix-js-sdk:
|
||||
specifier: github:matrix-org/matrix-js-sdk#develop
|
||||
version: https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/8073f27d98acd385a143a12f1d754d301a2f82f1
|
||||
version: https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/bd6547c0814e11b41e79de3cc9d0d4ecf7648272
|
||||
matrix-widget-api:
|
||||
specifier: ^1.16.1
|
||||
version: 1.17.0
|
||||
@@ -672,9 +672,6 @@ importers:
|
||||
raw-loader:
|
||||
specifier: ^4.0.2
|
||||
version: 4.0.2(webpack@5.105.2)
|
||||
rimraf:
|
||||
specifier: ^6.0.0
|
||||
version: 6.1.2
|
||||
semver:
|
||||
specifier: ^7.5.2
|
||||
version: 7.7.4
|
||||
@@ -7889,8 +7886,8 @@ packages:
|
||||
matrix-events-sdk@0.0.1:
|
||||
resolution: {integrity: sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==}
|
||||
|
||||
matrix-js-sdk@https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/8073f27d98acd385a143a12f1d754d301a2f82f1:
|
||||
resolution: {tarball: https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/8073f27d98acd385a143a12f1d754d301a2f82f1}
|
||||
matrix-js-sdk@https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/bd6547c0814e11b41e79de3cc9d0d4ecf7648272:
|
||||
resolution: {tarball: https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/bd6547c0814e11b41e79de3cc9d0d4ecf7648272}
|
||||
version: 40.2.0
|
||||
engines: {node: '>=22.0.0'}
|
||||
|
||||
@@ -18899,7 +18896,7 @@ snapshots:
|
||||
|
||||
matrix-events-sdk@0.0.1: {}
|
||||
|
||||
matrix-js-sdk@https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/8073f27d98acd385a143a12f1d754d301a2f82f1:
|
||||
matrix-js-sdk@https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/bd6547c0814e11b41e79de3cc9d0d4ecf7648272:
|
||||
dependencies:
|
||||
'@babel/runtime': 7.28.6
|
||||
'@matrix-org/matrix-sdk-crypto-wasm': 17.1.0
|
||||
|
||||
+1
-7
@@ -3,14 +3,9 @@
|
||||
"projectType": "application",
|
||||
"implicitDependencies": ["@element-hq/web-shared-components"],
|
||||
"targets": {
|
||||
"clean": {
|
||||
"command": "rimraf webapp",
|
||||
"outputs": ["{projectRoot}/webapp/"]
|
||||
},
|
||||
"prebuild:i18n": {
|
||||
"cache": true,
|
||||
"command": "node scripts/copy-res.ts",
|
||||
"dependsOn": ["clean"],
|
||||
"inputs": ["{projectRoot}/src/i18n/strings/*.json"],
|
||||
"outputs": ["{projectRoot}/webapp/i18n/"]
|
||||
},
|
||||
@@ -35,12 +30,11 @@
|
||||
},
|
||||
"start:i18n": {
|
||||
"command": "node scripts/copy-res.ts -w",
|
||||
"dependsOn": ["clean"],
|
||||
"continuous": true
|
||||
},
|
||||
"start": {
|
||||
"command": "webpack-dev-server --disable-interpret --output-path webapp --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js --mode development",
|
||||
"dependsOn": ["prebuild:*", "start:i18n", "^start"],
|
||||
"dependsOn": ["prebuild:module_system", "prebuild:rethemendex", "start:i18n", "^start"],
|
||||
"continuous": true
|
||||
},
|
||||
"lint:types": {
|
||||
|
||||
+7
-11
@@ -7,7 +7,7 @@ import * as chokidar from "chokidar";
|
||||
import * as fs from "node:fs";
|
||||
import _ from "lodash";
|
||||
import webpack from "webpack";
|
||||
import type { Translations } from "matrix-web-i18n";
|
||||
import { type Translations } from "matrix-web-i18n";
|
||||
|
||||
const EW_I18N_BASE_PATH = "src/i18n/strings/";
|
||||
const SC_I18N_BASE_PATH = "packages/shared-components/src/i18n/strings/";
|
||||
@@ -28,16 +28,13 @@ function errCheck(err: unknown): void {
|
||||
}
|
||||
}
|
||||
|
||||
// Check if webapp exists
|
||||
if (!fs.existsSync("webapp")) {
|
||||
fs.mkdirSync("webapp");
|
||||
}
|
||||
// Check if i18n exists
|
||||
if (!fs.existsSync("webapp/i18n/")) {
|
||||
fs.mkdirSync("webapp/i18n/");
|
||||
const I18N_DEST = "webapp/i18n/";
|
||||
// Check if webapp/i18n exists
|
||||
if (!fs.existsSync(I18N_DEST)) {
|
||||
fs.mkdirSync(I18N_DEST, { recursive: true });
|
||||
}
|
||||
|
||||
const logWatch = (path: string) => {
|
||||
const logWatch = (path: string): void => {
|
||||
if (verbose) {
|
||||
console.log(`Watching: ${path}`);
|
||||
}
|
||||
@@ -72,7 +69,7 @@ function prepareLangFile(lang: string): [filename: string, json: string] {
|
||||
return [filename, json];
|
||||
}
|
||||
|
||||
function genLangFile(dest: string, filename: string, json: string) {
|
||||
function genLangFile(dest: string, filename: string, json: string): void {
|
||||
fs.writeFileSync(dest + filename, json);
|
||||
if (verbose) {
|
||||
console.log("Generated language file: " + filename);
|
||||
@@ -139,7 +136,6 @@ function watchLanguage(lang: string, dest: string, langFileMap: Record<string, s
|
||||
}
|
||||
|
||||
// language resources
|
||||
const I18N_DEST = "webapp/i18n/";
|
||||
const I18N_FILENAME_MAP = INCLUDE_LANGS.reduce<Record<string, string>>((m, l) => {
|
||||
const [filename, json] = prepareLangFile(l);
|
||||
if (!watch) {
|
||||
|
||||
Reference in New Issue
Block a user