@kgalexander/mcreate 0.0.2

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 (3) hide show
  1. package/README.md +40 -0
  2. package/index.js +7 -0
  3. package/package.json +19 -0
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # mcreate
2
+
3
+ mcreate package
4
+
5
+ ## Local Development with npm link
6
+
7
+ When using `npm link` to develop these packages locally with a Next.js application, you need to configure Next.js to resolve symlinked packages outside the project directory.
8
+
9
+ ### Setup
10
+
11
+ 1. Link the package globally:
12
+ ```bash
13
+ cd mpackages/packages/mcreate
14
+ npm link
15
+ ```
16
+
17
+ 2. Link it in your Next.js project:
18
+ ```bash
19
+ cd your-nextjs-project
20
+ npm link mcreate
21
+ ```
22
+
23
+ 3. Update your projects `next.config.ts` to support external symlinks:
24
+ ```ts
25
+ import type { NextConfig } from "next";
26
+ import path from "path";
27
+
28
+ const nextConfig: NextConfig = {
29
+ transpilePackages: ['mcreate'],
30
+ outputFileTracingRoot: path.join(__dirname, "../"),
31
+ };
32
+
33
+ export default nextConfig;
34
+ ```
35
+
36
+ > **Note:** Adjust the `"../"` path to point to the common parent directory containing both your Next.js project and the mpackages folder.
37
+
38
+ ### Why is this needed?
39
+
40
+ 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.
package/index.js ADDED
@@ -0,0 +1,7 @@
1
+ function MaillowCreate() {
2
+ console.log('mcreate');
3
+
4
+ return "mcreate package is ready!";
5
+ }
6
+
7
+ module.exports = MaillowCreate;
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@kgalexander/mcreate",
3
+ "version": "0.0.2",
4
+ "description": "Maillow email template editor",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Kga-6/mpackages.git#main"
12
+ },
13
+ "author": "Kevin Guerrero",
14
+ "license": "ISC",
15
+ "bugs": {
16
+ "url": "https://github.com/Kga-6/mpackages/issues"
17
+ },
18
+ "homepage": "https://github.com/Kga-6/mpackages/tree/main#readme"
19
+ }