Skip to content

Commit 2872171

Browse files
rin-stPabl0cks
andauthored
feat: update createExtension (#134)
Co-authored-by: Pablo Alayeto <[email protected]>
1 parent 8a70be5 commit 2872171

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

docs/extensions/createExtensions.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Key points:
5555

5656
- They allow you to add specific content to files in the base project.
5757
- Not all files can be modified this way. See [TEMPLATE-FILES.md](https://github.com/scaffold-eth/create-eth/blob/main/contributors/TEMPLATE-FILES.md) for a list of supported template files.
58-
- To use a template file, create an `*.args.mjs` file in your extension having the same path structure as `*.template.mjs`. For example, to add extra tab in the header, you'd create `extension/packages/nextjs/components/Header.tsx.args.mjs`.
58+
- To use a template file, create an `*.args.mjs` file in your extension having the same path structure as `*.template.mjs`. For example, to add an extra tab in the header, you'd create `extension/packages/nextjs/components/Header.tsx.args.mjs`.
5959

6060
### Advanced Development Workflow
6161

@@ -92,8 +92,9 @@ The workflow consists of two main parts:
9292
```
9393

9494
This command will create a **new base instance**, similar to running `npx create-eth@latest`.
95+
Note: It's recommended to create a **new base instance** outside of the `create-eth` folder, so use `../<your-instance-name>`.
9596

96-
The name mentioned for the "Your project name" question will be used as the **extension name**. For example, if you provide `eip` as the value to the question, then the final extension name will be `eip`.
97+
The name mentioned for the "Your project name" question will be used as the **extension name**. For example, if you provide `../eip` as the value to the question, then the final extension name will be `eip`.
9798

9899
4. **Develop the Extension:**
99100

@@ -109,9 +110,9 @@ The workflow consists of two main parts:
109110
yarn create-extension {projectName}
110111
```
111112

112-
Example: `yarn create-extension eip`
113+
Example: `yarn create-extension ../eip`
113114

114-
This command gathers all changes from the instance and creates an extension in the `create-eth/externalExtensions/${extensionName}` directory. This directory is the actual extension directory (notice it contains only extra files related to your extension changes), which can be published to GitHub and used by others.
115+
This command gathers all changes from the instance and creates an extension in the `create-eth/externalExtensions/${extensionName}` directory. This directory is the actual extension directory (notice it contains only the extra files related to your extension changes), which can be published to GitHub and used by others.
115116

116117
6. **Publish the Extension:**
117118

@@ -149,10 +150,10 @@ This phase allows you to test your extension locally and see how it works when u
149150

150151
The `extensionName` should be present in `create-eth/externalExtensions/${extensionName}`.
151152

152-
Let's suppose you named your project "my-dev-instance". Then this `my-dev-instance` should contain all your extension changes. `--dev` will symlink the extension to the instance project.
153+
Let's suppose you named your project "../my-dev-instance". Then this `../my-dev-instance` should contain all your extension changes. `--dev` will symlink the extension to the instance project.
153154

154155
2. **Test and Tweak the Extension:**
155-
Since the instance is symlinked with the extension, make necessary changes directly in the symlinked files within `my-dev-instance`, and changes should be automatically reflected in the `create-eth/externalExtensions/${extensionName}` directory.
156+
Since the instance is symlinked with the extension, make necessary changes directly in the symlinked files within `../my-dev-instance`, and the changes should be automatically reflected in the `create-eth/externalExtensions/${extensionName}` directory.
156157

157158
3. **Push the tweaked changes**
158159

static/llms-full.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ Key points:
902902

903903
- They allow you to add specific content to files in the base project.
904904
- Not all files can be modified this way. See [TEMPLATE-FILES.md](https://github.com/scaffold-eth/create-eth/blob/main/contributors/TEMPLATE-FILES.md) for a list of supported template files.
905-
- To use a template file, create an `*.args.mjs` file in your extension having the same path structure as `*.template.mjs`. For example, to add extra tab in the header, you'd create `extension/packages/nextjs/components/Header.tsx.args.mjs`.
905+
- To use a template file, create an `*.args.mjs` file in your extension having the same path structure as `*.template.mjs`. For example, to add an extra tab in the header, you'd create `extension/packages/nextjs/components/Header.tsx.args.mjs`.
906906

907907
#### Advanced Development Workflow
908908

@@ -940,7 +940,9 @@ The workflow consists of two main parts:
940940

941941
This command will create a **new base instance**, similar to running `npx create-eth@latest`.
942942

943-
The name mentioned for the "Your project name" question will be used as the **extension name**. For example, if you provide `eip` as the value to the question, then the final extension name will be `eip`.
943+
Note: it's recommended to create a **new base instance** outside of the `create-eth` folder, so use `../<your-instance-name>`.
944+
945+
The name mentioned for the "Your project name" question will be used as the **extension name**. For example, if you provide `../eip` as the value to the question, then the final extension name will be `eip`.
944946

945947
4. **Develop the Extension:**
946948

@@ -956,9 +958,9 @@ The workflow consists of two main parts:
956958
yarn create-extension {projectName}
957959
```
958960

959-
Example: `yarn create-extension eip`
961+
Example: `yarn create-extension ../eip`
960962

961-
This command gathers all changes from the instance and creates an extension in the `create-eth/externalExtensions/${extensionName}` directory. This directory is the actual extension directory (notice it contains only extra files related to your extension changes), which can be published to GitHub and used by others.
963+
This command gathers all changes from the instance and creates an extension in the `create-eth/externalExtensions/${extensionName}` directory. This directory is the actual extension directory (notice it contains only the extra files related to your extension changes), which can be published to GitHub and used by others.
962964

963965
6. **Publish the Extension:**
964966

@@ -996,10 +998,10 @@ This phase allows you to test your extension locally and see how it works when u
996998

997999
The `extensionName` should be present in `create-eth/externalExtensions/${extensionName}`.
9981000

999-
Let's suppose you named your project "my-dev-instance". Then this `my-dev-instance` should contain all your extension changes. `--dev` will symlink the extension to the instance project.
1001+
Let's suppose you named your project "../my-dev-instance". Then this `../my-dev-instance` should contain all your extension changes. `--dev` will symlink the extension to the instance project.
10001002

10011003
2. **Test and Tweak the Extension:**
1002-
Since the instance is symlinked with the extension, make necessary changes directly in the symlinked files within `my-dev-instance`, and changes should be automatically reflected in the `create-eth/externalExtensions/${extensionName}` directory.
1004+
Since the instance is symlinked with the extension, make necessary changes directly in the symlinked files within `../my-dev-instance`, and the changes should be automatically reflected in the `create-eth/externalExtensions/${extensionName}` directory.
10031005

10041006
3. **Push the tweaked changes**
10051007

0 commit comments

Comments
 (0)