Skip to content

Commit

Permalink
Change placeholder format so CI passes
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Nov 19, 2024
1 parent 56b0001 commit a9fdd76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cli/src/commands/new/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,10 @@ export default class NewCommand extends BaseCommand {
// Replace placeholders in the template
switch (sdk) {
case SDK.AssemblyScript:
await replacePlaceHolder("MODUS_APP_NAME", path.join(dir, "package.json"), name);
await replacePlaceHolder("__MODUS_APP_NAME__", path.join(dir, "package.json"), name);
break;
case SDK.Go:
await replacePlaceHolder("MODUS_APP_NAME", path.join(dir, "go.mod"), name);
await replacePlaceHolder("__MODUS_APP_NAME__", path.join(dir, "go.mod"), name);
break;
}

Expand Down Expand Up @@ -345,7 +345,7 @@ export default class NewCommand extends BaseCommand {
async function replacePlaceHolder(placeholder: string, filePath: string, content: string): Promise<void> {
try {
let fileContent = await fs.readFile(filePath, "utf8");
const regex = new RegExp(`<% ${placeholder} %>`, "g");
const regex = new RegExp(`${placeholder}`, "g");
fileContent = fileContent.replace(regex, content);
await fs.writeFile(filePath, fileContent, "utf8");
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion sdk/assemblyscript/templates/default/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "<% MODUS_APP_NAME %>",
"name": "__MODUS_APP_NAME__",
"private": true,
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/templates/default/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module <% MODUS_APP_NAME %>
module __MODUS_APP_NAME__

go 1.23.0

0 comments on commit a9fdd76

Please sign in to comment.