rebuiltron 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,8 +44,6 @@ Rebuiltron expects the following folder structure:
44
44
 
45
45
  ```shell
46
46
  my-app
47
- ├── electron/
48
- │ └── # Main and preload files
49
47
  ├── public/
50
48
  │ └── # Renderer HTML file(s)
51
49
  ├── src/
@@ -92,8 +90,8 @@ At the root of your project, create a `rebuiltron.config.cjs` file.
92
90
 
93
91
  | Option | Type | Required | Description |
94
92
  | --- | :---: | :---: | --- |
95
- | `renderers` | `object` | ✓ | Renderer entries. It takes the name of the entries as keys and their paths as values. |
96
- | `preloads` | `object` | ✓ | Preload entries. It takes the name of the entries as keys and their paths as values. |
93
+ | `renderers` | `object` | ✓ | Renderer entries. It takes the name of the entries as keys and their paths as values. All paths must be relative. |
94
+ | `preloads` | `object` | ✓ | Preload entries. It takes the name of the entries as keys and their paths as values. All paths must be relative. |
97
95
  | `srcAlias` | `string` | ✗ | Custom [alias](https://webpack.js.org/configuration/resolve/#resolvealias) to the `src` folder.
98
96
  | `sassOptions` | `object` | ✗ | Custom SASS options for [`sass-loader`](https://github.com/webpack-contrib/sass-loader). |
99
97
  | `sassOptions.additionalData` | `object` | ✗* | Configuration of [`additionalData`](https://webpack.js.org/loaders/sass-loader/#additionaldata). |
@@ -44,11 +44,11 @@ module.exports = {
44
44
  level: "none"
45
45
  },
46
46
  resolve: {
47
- modules: ["node_modules", paths.appNodeModules, paths.appSrc],
47
+ modules: ["node_modules", paths.appNodeModules, paths.src],
48
48
  extensions: [".web.js", ".js", ".json", ".jsx", ".node"],
49
49
  ...emptyOr(srcAlias, {
50
50
  alias: {
51
- [srcAlias]: paths.appSrc
51
+ [srcAlias]: paths.src
52
52
  }
53
53
  })
54
54
  },
package/helpers/paths.js CHANGED
@@ -14,8 +14,7 @@ module.exports = {
14
14
  appBuild: resolveApp(rebuiltronConfig.appDirs.build),
15
15
  appPublic: resolveApp(rebuiltronConfig.appDirs.public),
16
16
  appPackageJson: packageJsonPath,
17
- appSrc: resolveApp(rebuiltronConfig.appDirs.appSrc),
18
- electronSrc: resolveApp(rebuiltronConfig.appDirs.electronSrc),
17
+ src: resolveApp(rebuiltronConfig.appDirs.src),
19
18
  appNodeModules: resolveApp("node_modules"),
20
19
  appWebpackCache: resolveApp("node_modules/.cache"),
21
20
  basePath: isEnvDevelopment ? "/" : "./"
@@ -6,7 +6,7 @@ module.exports = [
6
6
  {
7
7
  // Converts `import.meta.url` before SWC transpiles so paths using it stay dynamic
8
8
  test: /\.js$/,
9
- include: [paths.electronSrc],
9
+ include: [paths.electronMain],
10
10
  loader: require.resolve("string-replace-loader"),
11
11
  options: {
12
12
  search: "import.meta.url",
package/loaders/style.js CHANGED
@@ -71,7 +71,7 @@ module.exports = [
71
71
  loader: require.resolve("resolve-url-loader"),
72
72
  options: {
73
73
  sourceMap: shouldUseSourceMap,
74
- root: paths.appSrc
74
+ root: paths.src
75
75
  }
76
76
  },
77
77
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebuiltron",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "author": "Arkellys",
5
5
  "license": "MIT",
6
6
  "bin": "bin/index.js",
@@ -11,8 +11,7 @@ module.exports = {
11
11
  },
12
12
  appDirs: {
13
13
  public: "public",
14
- electronSrc: "electron",
15
- appSrc: "src",
14
+ src: "src",
16
15
  build: "build"
17
16
  }
18
17
  };
@@ -11,7 +11,7 @@ module.exports = {
11
11
  directory: paths.appPublic,
12
12
  publicPath: [paths.basePath],
13
13
  watch: {
14
- ignored: ignoredFiles(paths.appSrc)
14
+ ignored: ignoredFiles(paths.src)
15
15
  }
16
16
  },
17
17
  client: {