@kgalexander/mcreate 0.0.4 → 0.0.6
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 +51 -4
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +35 -0
- package/dist/index.mjs +8 -0
- package/package.json +29 -4
- package/index.js +0 -7
package/README.md
CHANGED
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
mcreate package
|
|
4
4
|
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @kgalexander/mcreate
|
|
9
|
+
```
|
|
10
|
+
|
|
5
11
|
## Local Development with npm link
|
|
6
12
|
|
|
7
|
-
When using `npm link` to develop
|
|
13
|
+
When using `npm link` to develop this package locally with a Next.js application, you need to configure Next.js to resolve symlinked packages outside the project directory.
|
|
8
14
|
|
|
9
15
|
### Setup
|
|
10
16
|
|
|
@@ -17,16 +23,16 @@ When using `npm link` to develop these packages locally with a Next.js applicati
|
|
|
17
23
|
2. Link it in your Next.js project:
|
|
18
24
|
```bash
|
|
19
25
|
cd your-nextjs-project
|
|
20
|
-
npm link mcreate
|
|
26
|
+
npm link @kgalexander/mcreate
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
3. Update your
|
|
29
|
+
3. Update your project's `next.config.ts` to support external symlinks:
|
|
24
30
|
```ts
|
|
25
31
|
import type { NextConfig } from "next";
|
|
26
32
|
import path from "path";
|
|
27
33
|
|
|
28
34
|
const nextConfig: NextConfig = {
|
|
29
|
-
transpilePackages: ['mcreate'],
|
|
35
|
+
transpilePackages: ['@kgalexander/mcreate'],
|
|
30
36
|
outputFileTracingRoot: path.join(__dirname, "../"),
|
|
31
37
|
};
|
|
32
38
|
|
|
@@ -38,3 +44,44 @@ When using `npm link` to develop these packages locally with a Next.js applicati
|
|
|
38
44
|
### Why is this needed?
|
|
39
45
|
|
|
40
46
|
Turbopack (used by Next.js) doesn't support reading files or symlinks outside your project directory by default. The `outputFileTracingRoot` option expands the allowed directory scope to include the linked packages.
|
|
47
|
+
|
|
48
|
+
## Deploying to Vercel
|
|
49
|
+
|
|
50
|
+
**Important:** The `outputFileTracingRoot` configuration breaks Vercel deployments. Before deploying:
|
|
51
|
+
|
|
52
|
+
1. Remove `outputFileTracingRoot` from your `next.config.ts`:
|
|
53
|
+
```ts
|
|
54
|
+
import type { NextConfig } from "next";
|
|
55
|
+
|
|
56
|
+
const nextConfig: NextConfig = {
|
|
57
|
+
transpilePackages: ['@kgalexander/mcreate'],
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default nextConfig;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
2. Run `npm install` to ensure the package is installed from npm (not linked)
|
|
64
|
+
|
|
65
|
+
3. Deploy to Vercel
|
|
66
|
+
|
|
67
|
+
### Quick Toggle
|
|
68
|
+
|
|
69
|
+
You can keep both configurations in your `next.config.ts` and comment/uncomment as needed:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
import type { NextConfig } from "next";
|
|
73
|
+
import path from "path";
|
|
74
|
+
|
|
75
|
+
// Production config (for Vercel deployment)
|
|
76
|
+
const nextConfig: NextConfig = {
|
|
77
|
+
transpilePackages: ['@kgalexander/mcreate'],
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Local development config (for npm link)
|
|
81
|
+
// const nextConfig: NextConfig = {
|
|
82
|
+
// transpilePackages: ['@kgalexander/mcreate'],
|
|
83
|
+
// outputFileTracingRoot: path.join(__dirname, "../"),
|
|
84
|
+
// };
|
|
85
|
+
|
|
86
|
+
export default nextConfig;
|
|
87
|
+
```
|
package/dist/index.d.mts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.tsx
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
Editor: () => Editor
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/Editor.tsx
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function Editor() {
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { children: "Editor v0.0.5" }) });
|
|
31
|
+
}
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
Editor
|
|
35
|
+
});
|
package/dist/index.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kgalexander/mcreate",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Maillow email template editor",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"access": "public",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
6
19
|
"scripts": {
|
|
7
|
-
"
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"dev": "tsup --watch",
|
|
22
|
+
"prepublishOnly": "npm run build"
|
|
8
23
|
},
|
|
9
24
|
"repository": {
|
|
10
25
|
"type": "git",
|
|
@@ -15,5 +30,15 @@
|
|
|
15
30
|
"bugs": {
|
|
16
31
|
"url": "https://github.com/Kga-6/mpackages/issues"
|
|
17
32
|
},
|
|
18
|
-
"homepage": "https://github.com/Kga-6/mpackages/tree/main/packages/mcreate"
|
|
33
|
+
"homepage": "https://github.com/Kga-6/mpackages/tree/main/packages/mcreate",
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": ">=19.0.0",
|
|
36
|
+
"react-dom": ">=19.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/react": "^19.2.10",
|
|
40
|
+
"@types/react-dom": "^19.2.3",
|
|
41
|
+
"tsup": "^8.5.1",
|
|
42
|
+
"typescript": "^5.9.3"
|
|
43
|
+
}
|
|
19
44
|
}
|