Skip to content

Commit

Permalink
fix: replace assembly/main.ts globally
Browse files Browse the repository at this point in the history
Fixes #392

The `g` tell the regex to look for all matches in the file, rather than
stopping at the first
  • Loading branch information
chadoh committed Jul 8, 2020
1 parent 9f29c9c commit d82b24f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const doCreateProject = async function(options) {
if (options.rust) {
await replaceInFiles({ files: `${projectDir}/src/*`, from: /getGreeting/g, to: 'get_greeting' });
await replaceInFiles({ files: `${projectDir}/src/*`, from: /setGreeting/g, to: 'set_greeting' });
await replaceInFiles({ files: `${projectDir}/src/*`, from: /assembly\/main.ts/, to: 'contract/src/lib.rs' });
await replaceInFiles({ files: `${projectDir}/src/*`, from: /assembly\/main.ts/g, to: 'contract/src/lib.rs' });
await replaceInFiles({ files: `${projectDir}/src/*`, from: /accountId:/g, to: 'account_id:' });
}

Expand Down

0 comments on commit d82b24f

Please sign in to comment.