makepack 1.5.9 → 1.5.11
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/package.json
CHANGED
|
@@ -22,14 +22,18 @@ const build = async () => {
|
|
|
22
22
|
fs.mkdirSync(outdir);
|
|
23
23
|
} catch (err) { }
|
|
24
24
|
|
|
25
|
+
const batchSize = 500;
|
|
25
26
|
for (let ebconfig of configs) {
|
|
26
|
-
const files = await glob(ebconfig.entryPoints) || []
|
|
27
|
-
const entryPoints = files.map(entry => path.join(process.cwd(), entry))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
const files = await glob(ebconfig.entryPoints) || [];
|
|
28
|
+
const entryPoints = files.map(entry => path.join(process.cwd(), entry));
|
|
29
|
+
for (let i = 0; i < entryPoints.length; i += batchSize) {
|
|
30
|
+
const batch = entryPoints.slice(i, i + batchSize);
|
|
31
|
+
await esbuild.build({
|
|
32
|
+
...ebconfig,
|
|
33
|
+
entryPoints: batch,
|
|
34
|
+
outdir: path.join(outdir, ebconfig.outdir || ''),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
if (build.types) {
|
|
@@ -1,9 +1,62 @@
|
|
|
1
|
-
import fs from 'fs-extra'
|
|
2
|
-
import path from 'path'
|
|
3
1
|
|
|
4
|
-
export default async () => {
|
|
5
|
-
|
|
6
|
-
const content =
|
|
2
|
+
export default async (info) => {
|
|
3
|
+
let pkgname = info.projectDirName
|
|
4
|
+
const content = `
|
|
5
|
+
# ${pkgname}
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/${pkgname})
|
|
8
|
+
[](https://github.com/your-username/${pkgname}/blob/main/LICENSE)
|
|
9
|
+
[](https://www.npmjs.com/package/${pkgname})
|
|
10
|
+
|
|
11
|
+
A brief description of what your package does and its purpose.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
\`\`\`sh
|
|
16
|
+
npm install ${pkgname}
|
|
17
|
+
\`\`\`
|
|
18
|
+
|
|
19
|
+
or with yarn:
|
|
20
|
+
|
|
21
|
+
\`\`\`sh
|
|
22
|
+
yarn add ${pkgname}
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
\`\`\`js
|
|
28
|
+
import { feature } from "${pkgname}";
|
|
29
|
+
|
|
30
|
+
const result = feature("example");
|
|
31
|
+
console.log(result);
|
|
32
|
+
\`\`\`
|
|
33
|
+
|
|
34
|
+
## API
|
|
35
|
+
|
|
36
|
+
### \`feature(input: string): string\`
|
|
37
|
+
Description of the function and its parameters.
|
|
38
|
+
|
|
39
|
+
## Configuration (if applicable)
|
|
40
|
+
Explain any configuration options if your package requires setup.
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
Provide additional usage examples for clarity.
|
|
44
|
+
|
|
45
|
+
## Contributing
|
|
46
|
+
Contributions are welcome! Please follow the guidelines in [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
51
|
+
|
|
52
|
+
## Links
|
|
53
|
+
- [GitHub Repository](https://github.com/your-username/${pkgname})
|
|
54
|
+
- [NPM Package](https://www.npmjs.com/package/${pkgname})
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
Feel free to modify this template based on your package's specific needs.
|
|
59
|
+
`
|
|
7
60
|
return {
|
|
8
61
|
content,
|
|
9
62
|
filename: `readme.md`
|