makepack 1.7.2 → 1.7.3
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/logo.png +0 -0
- package/package.json +1 -6
- package/src/actions/build/bundler.js +2 -2
- package/src/actions/start/index.js +7 -5
package/logo.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "makepack",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.3",
|
|
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
|
-
"files": [
|
|
7
|
-
"src",
|
|
8
|
-
"package.json",
|
|
9
|
-
"README.md"
|
|
10
|
-
],
|
|
11
6
|
"categories": [
|
|
12
7
|
"Other"
|
|
13
8
|
],
|
|
@@ -9,7 +9,7 @@ import dts from "rollup-plugin-dts";
|
|
|
9
9
|
import json from '@rollup/plugin-json';
|
|
10
10
|
import terser from "@rollup/plugin-terser";
|
|
11
11
|
|
|
12
|
-
async function
|
|
12
|
+
async function bundler(args, spinner) {
|
|
13
13
|
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
|
|
14
14
|
const external = [
|
|
15
15
|
...builtinModules,
|
|
@@ -96,4 +96,4 @@ async function build(args, spinner) {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export default
|
|
99
|
+
export default bundler;
|
|
@@ -13,6 +13,7 @@ import { logger, concolor } from '../../helpers.js';
|
|
|
13
13
|
|
|
14
14
|
const projectRoot = process.cwd();
|
|
15
15
|
const requireFn = createRequire(import.meta.url);
|
|
16
|
+
const mpack = path.join(projectRoot, '.mpack');
|
|
16
17
|
|
|
17
18
|
let server = null;
|
|
18
19
|
let app = null;
|
|
@@ -81,11 +82,7 @@ async function bootServer(args) {
|
|
|
81
82
|
|
|
82
83
|
|
|
83
84
|
let esbuildCtx = null;
|
|
84
|
-
|
|
85
|
-
if (fs.existsSync(mpack)) {
|
|
86
|
-
fs.rmSync(mpack, { recursive: true, force: true });
|
|
87
|
-
}
|
|
88
|
-
fs.mkdirSync(mpack, { recursive: true });
|
|
85
|
+
|
|
89
86
|
const buildFile = path.join(mpack, `${randomUUID().substring(0, 15)}.js`);
|
|
90
87
|
|
|
91
88
|
async function loadExp() {
|
|
@@ -156,6 +153,11 @@ async function getAllDependencies() {
|
|
|
156
153
|
|
|
157
154
|
let watcher;
|
|
158
155
|
async function startDevServer(args) {
|
|
156
|
+
if (fs.existsSync(mpack)) {
|
|
157
|
+
fs.rmSync(mpack, { recursive: true, force: true });
|
|
158
|
+
}
|
|
159
|
+
fs.mkdirSync(mpack, { recursive: true });
|
|
160
|
+
|
|
159
161
|
await bootServer(args);
|
|
160
162
|
const filesToWatch = await getAllDependencies();
|
|
161
163
|
if (watcher) watcher.close();
|