diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-12-23 17:19:52 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-12-23 17:54:03 +0100 |
commit | a8c4df8744ac0d9e6a889af3ad3dcbd3e100ee0a (patch) | |
tree | d10c6ab5daa20f49594dfcc3b842dff4e963a670 /packages/renderer | |
parent | build: Enable typescript composite mode and clean (diff) | |
download | sophie-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.tsx | 20 | ||||
-rw-r--r-- | packages/renderer/src/components/ThemeProvider.tsx | 20 | ||||
-rw-r--r-- | packages/renderer/src/devTools.ts | 20 | ||||
-rw-r--r-- | packages/renderer/src/index.tsx | 20 | ||||
-rw-r--r-- | packages/renderer/src/stores/RootStore.ts | 20 | ||||
-rw-r--r-- | packages/renderer/vite.config.js | 16 |
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 | |||
1 | import React, { createContext, useContext } from 'react'; | 21 | import React, { createContext, useContext } from 'react'; |
2 | 22 | ||
3 | import type { RootStore } from '../stores/RootStore'; | 23 | import 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 | |||
1 | import { observer } from 'mobx-react-lite'; | 21 | import { observer } from 'mobx-react-lite'; |
2 | import { | 22 | import { |
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 | |||
1 | import type { IAnyStateTreeNode } from 'mobx-state-tree'; | 21 | import 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 | |||
1 | import '@fontsource/roboto/300.css'; | 21 | import '@fontsource/roboto/300.css'; |
2 | import '@fontsource/roboto/400.css'; | 22 | import '@fontsource/roboto/400.css'; |
3 | import '@fontsource/roboto/500.css'; | 23 | import '@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 | |||
1 | import { | 21 | import { |
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 @@ | |||
5 | import { builtinModules } from 'module'; | 5 | import { builtinModules } from 'module'; |
6 | import react from '@vitejs/plugin-react'; | 6 | import react from '@vitejs/plugin-react'; |
7 | 7 | ||
8 | // `resolveJsonModule` is disabled for this package, but vite will load the json nevertheless. | 8 | import { chrome, makeConfig } from '../../config/vite-common'; |
9 | // @ts-expect-error | ||
10 | import { chrome } from '../../.electron-vendors.cache.json'; | ||
11 | 9 | ||
12 | /** @type string */ | 10 | /** @type string */ |
13 | const PACKAGE_ROOT = __dirname; | 11 | const 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 | */ |
19 | const config = { | 17 | const 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 | ||
48 | export default config; | 40 | export default config; |