aboutsummaryrefslogtreecommitdiffstats
path: root/packages/renderer
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2021-12-23 17:19:52 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2021-12-23 17:54:03 +0100
commita8c4df8744ac0d9e6a889af3ad3dcbd3e100ee0a (patch)
treed10c6ab5daa20f49594dfcc3b842dff4e963a670 /packages/renderer
parentbuild: Enable typescript composite mode and clean (diff)
downloadsophie-a8c4df8744ac0d9e6a889af3ad3dcbd3e100ee0a.tar.gz
sophie-a8c4df8744ac0d9e6a889af3ad3dcbd3e100ee0a.tar.zst
sophie-a8c4df8744ac0d9e6a889af3ad3dcbd3e100ee0a.zip
chore: Add license headers
Centralizes vite configuration to be able to add license banners to outputs in one place.
Diffstat (limited to 'packages/renderer')
-rw-r--r--packages/renderer/src/components/StoreProvider.tsx20
-rw-r--r--packages/renderer/src/components/ThemeProvider.tsx20
-rw-r--r--packages/renderer/src/devTools.ts20
-rw-r--r--packages/renderer/src/index.tsx20
-rw-r--r--packages/renderer/src/stores/RootStore.ts20
-rw-r--r--packages/renderer/vite.config.js16
6 files changed, 104 insertions, 12 deletions
diff --git a/packages/renderer/src/components/StoreProvider.tsx b/packages/renderer/src/components/StoreProvider.tsx
index 51c39f7..0d9a36c 100644
--- a/packages/renderer/src/components/StoreProvider.tsx
+++ b/packages/renderer/src/components/StoreProvider.tsx
@@ -1,3 +1,23 @@
1/*
2 * Copyright (C) 2021-2022 Kristóf Marussy <kristof@marussy.com>
3 *
4 * This file is part of Sophie.
5 *
6 * Sophie is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: AGPL-3.0-only
19 */
20
1import React, { createContext, useContext } from 'react'; 21import React, { createContext, useContext } from 'react';
2 22
3import type { RootStore } from '../stores/RootStore'; 23import type { RootStore } from '../stores/RootStore';
diff --git a/packages/renderer/src/components/ThemeProvider.tsx b/packages/renderer/src/components/ThemeProvider.tsx
index 8be4f6a..7173a9d 100644
--- a/packages/renderer/src/components/ThemeProvider.tsx
+++ b/packages/renderer/src/components/ThemeProvider.tsx
@@ -1,3 +1,23 @@
1/*
2 * Copyright (C) 2021-2022 Kristóf Marussy <kristof@marussy.com>
3 *
4 * This file is part of Sophie.
5 *
6 * Sophie is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: AGPL-3.0-only
19 */
20
1import { observer } from 'mobx-react-lite'; 21import { observer } from 'mobx-react-lite';
2import { 22import {
3 unstable_createMuiStrictModeTheme as createTheme, 23 unstable_createMuiStrictModeTheme as createTheme,
diff --git a/packages/renderer/src/devTools.ts b/packages/renderer/src/devTools.ts
index 5930c48..ffd99e6 100644
--- a/packages/renderer/src/devTools.ts
+++ b/packages/renderer/src/devTools.ts
@@ -1,3 +1,23 @@
1/*
2 * Copyright (C) 2021-2022 Kristóf Marussy <kristof@marussy.com>
3 *
4 * This file is part of Sophie.
5 *
6 * Sophie is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: AGPL-3.0-only
19 */
20
1import type { IAnyStateTreeNode } from 'mobx-state-tree'; 21import type { IAnyStateTreeNode } from 'mobx-state-tree';
2 22
3/** 23/**
diff --git a/packages/renderer/src/index.tsx b/packages/renderer/src/index.tsx
index 34b21de..901d137 100644
--- a/packages/renderer/src/index.tsx
+++ b/packages/renderer/src/index.tsx
@@ -1,3 +1,23 @@
1/*
2 * Copyright (C) 2021-2022 Kristóf Marussy <kristof@marussy.com>
3 *
4 * This file is part of Sophie.
5 *
6 * Sophie is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: AGPL-3.0-only
19 */
20
1import '@fontsource/roboto/300.css'; 21import '@fontsource/roboto/300.css';
2import '@fontsource/roboto/400.css'; 22import '@fontsource/roboto/400.css';
3import '@fontsource/roboto/500.css'; 23import '@fontsource/roboto/500.css';
diff --git a/packages/renderer/src/stores/RootStore.ts b/packages/renderer/src/stores/RootStore.ts
index 86efac6..f24ea4d 100644
--- a/packages/renderer/src/stores/RootStore.ts
+++ b/packages/renderer/src/stores/RootStore.ts
@@ -1,3 +1,23 @@
1/*
2 * Copyright (C) 2021-2022 Kristóf Marussy <kristof@marussy.com>
3 *
4 * This file is part of Sophie.
5 *
6 * Sophie is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Affero General Public License for more details.
14 *
15 * You should have received a copy of the GNU Affero General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 *
18 * SPDX-License-Identifier: AGPL-3.0-only
19 */
20
1import { 21import {
2 applySnapshot, 22 applySnapshot,
3 applyPatch, 23 applyPatch,
diff --git a/packages/renderer/vite.config.js b/packages/renderer/vite.config.js
index 87c2d0c..100e182 100644
--- a/packages/renderer/vite.config.js
+++ b/packages/renderer/vite.config.js
@@ -5,9 +5,7 @@
5import { builtinModules } from 'module'; 5import { builtinModules } from 'module';
6import react from '@vitejs/plugin-react'; 6import react from '@vitejs/plugin-react';
7 7
8// `resolveJsonModule` is disabled for this package, but vite will load the json nevertheless. 8import { chrome, makeConfig } from '../../config/vite-common';
9// @ts-expect-error
10import { chrome } from '../../.electron-vendors.cache.json';
11 9
12/** @type string */ 10/** @type string */
13const PACKAGE_ROOT = __dirname; 11const PACKAGE_ROOT = __dirname;
@@ -16,8 +14,7 @@ const PACKAGE_ROOT = __dirname;
16 * @type {import('vite').UserConfig} 14 * @type {import('vite').UserConfig}
17 * @see https://vitejs.dev/config/ 15 * @see https://vitejs.dev/config/
18 */ 16 */
19const config = { 17const config = makeConfig({
20 mode: process.env.MODE,
21 root: PACKAGE_ROOT, 18 root: PACKAGE_ROOT,
22 plugins: [ 19 plugins: [
23 react(), 20 react(),
@@ -29,10 +26,7 @@ const config = {
29 }, 26 },
30 }, 27 },
31 build: { 28 build: {
32 sourcemap: true, 29 target: chrome,
33 target: `chrome${chrome}`,
34 outDir: 'dist',
35 assetsDir: '.',
36 rollupOptions: { 30 rollupOptions: {
37 external: [ 31 external: [
38 'mst-middlewares', 32 'mst-middlewares',
@@ -40,9 +34,7 @@ const config = {
40 ...builtinModules, 34 ...builtinModules,
41 ], 35 ],
42 }, 36 },
43 emptyOutDir: true,
44 brotliSize: false,
45 }, 37 },
46}; 38});
47 39
48export default config; 40export default config;