Skip to content

Commit

Permalink
Merge pull request #471 from brown-ccv/type-module
Browse files Browse the repository at this point in the history
ref: `type: module`
  • Loading branch information
RobertGemmaJr authored May 16, 2024
2 parents 09d8e07 + 48a7c04 commit 0ec443c
Show file tree
Hide file tree
Showing 21 changed files with 2,867 additions and 6,786 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: actions/checkout@v4

- name: ⎔ Setup node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* This file defines specific rules for Prettier. It adjusts their default settings.
* We recommend these settings if your lab does not have specific style standards.
*/
module.exports = {
export default {
printWidth: 100, // Sets the maximum line size to 100 (default is 80)
quoteProps: "as-needed", // Add quotes around props as needed
trailingComma: "es5", // Add a trailing comma to all es5 modules
Expand Down
32 changes: 17 additions & 15 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { FusesPlugin } = require("@electron-forge/plugin-fuses");
const { FuseV1Options, FuseVersion } = require("@electron/fuses");
import { FusesPlugin } from "@electron-forge/plugin-fuses";
import { FuseV1Options, FuseVersion } from "@electron/fuses";

/** Configuration file for Electron Forge */
module.exports = {
export default {
packagerConfig: {
asar: true,
icon: "assets/icons/icon",
Expand Down Expand Up @@ -44,23 +44,25 @@ module.exports = {
name: "@electron-forge/plugin-vite",
config: {
build: [
{ entry: "src/electron/main.js", config: "vite.main.config.mjs" },
{ entry: "src/electron/preload.js", config: "vite.preload.config.mjs" },
// Build files that use the main config
{ entry: "src/electron/main.js", config: "vite.main.config.js" },
// Build files that use the preload config
{ entry: "src/Electron/preload.js", config: "vite.preload.config.js" },
],
renderer: [{ name: "main_window", config: "vite.renderer.config.mjs" }],
renderer: [{ name: "main_window", config: "vite.renderer.config.js" }],
},
},
// Fuses are used to enable/disable various Electron functionality
// at package time, before code signing the application
// TODO: Fuses configuration for Honeycomb
// Fuses are used to enable/disable various Electron functionality at package time, before code signing the application
new FusesPlugin({
version: FuseVersion.V1,
[FuseV1Options.RunAsNode]: false,
[FuseV1Options.EnableCookieEncryption]: true,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false,
[FuseV1Options.EnableNodeCliInspectArguments]: false,
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
[FuseV1Options.OnlyLoadAppFromAsar]: true,
[FuseV1Options.RunAsNode]: false, // Disables ELECTRON_RUN_AS_NODE
[FuseV1Options.GrantFileProtocolExtraPrivileges]: true, // Grants the file protocol extra privileges (for the built application)
[FuseV1Options.EnableCookieEncryption]: false, // Disables cookie encryption
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // Disables the NODE_OPTIONS environment variable
[FuseV1Options.EnableNodeCliInspectArguments]: false, // Disables the --inspect and --inspect-brk family of CLI options
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true, // Enforces validation of the app.asar archive on macOS
[FuseV1Options.OnlyLoadAppFromAsar]: true, // Enforces that Electron will only load your app from "app.asar" instead of its normal search paths
[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: true, // Loads V8 Snapshot from `browser_v8_context_snapshot.bin` for the browser process
}),
],
};
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script type="module" src="/src/Electron/renderer.js"></script>
<script type="module" src="/src/index.jsx"></script>

<!-- Root div that holds the react application -->
<div id="root"></div>
Expand Down
Loading

0 comments on commit 0ec443c

Please sign in to comment.