Skip to content

Commit

Permalink
fix bad import generation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDaksh committed Apr 26, 2021
1 parent c2ce5ff commit 57b1379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/addConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const questions = [
const match = /export/.exec(content)!;
let beforeExport = content.slice(0, match.index).trim();
let afterExport = content.slice(match.index, content.length).split(`{\n`);
beforeExport += `import {${answers.variable_name}} from './${answers.name}'`;
beforeExport += `\nimport {${answers.variable_name}} from './${answers.name}'`;

const final = `${beforeExport}\n${afterExport[0]}{\n "${answers.name}": ${answers.variable_name},\n${afterExport[1]}`;

Expand Down

0 comments on commit 57b1379

Please sign in to comment.