makepack 1.3.9 → 1.4.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.
Files changed (2) hide show
  1. package/README.md +21 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -18,9 +18,29 @@ This will allow you to use the `makepack` command anywhere in your terminal.
18
18
 
19
19
  ## Configuration Files
20
20
 
21
- **MakePack** supports loading configuration files for Vite and esbuild. If `vite.config.js` and `esbuild.config.js` exist in the root of the project, they will be automatically loaded when running the respective commands.
21
+ Previously, the project used separate configuration files for Vite and esbuild:
22
+ - `vite.config.js`
23
+ - `esbuild.config.js`
22
24
 
25
+ These files have been removed and replaced with a single configuration file: `makepack.js`.
23
26
 
27
+ ## makepack.js
28
+
29
+ The `makepack.js` file exports a function that takes the previous configuration (`prevConfig`) and returns a new configuration (`newConfig`). This allows you to configure both esbuild and Vite in one place.
30
+
31
+ ### Example Usage
32
+
33
+ ```javascript
34
+ // filepath: /Volumes/Work Space/makepack/makepack.js
35
+ module.exports = function(prevConfig) {
36
+ const newConfig = {
37
+ // ...your new configuration here...
38
+ };
39
+ return newConfig;
40
+ };
41
+ ```
42
+
43
+ This approach simplifies the configuration process by consolidating it into a single file.
24
44
 
25
45
  ## Commands
26
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makepack",
3
- "version": "1.3.9",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "description": "A CLI tool to create, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for npm projects.",
6
6
  "files": [