Skip to content

Instantly share code, notes, and snippets.

@videlais
Created June 21, 2019 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlais/93000ba70b81ff98d838a08992193b07 to your computer and use it in GitHub Desktop.
Save videlais/93000ba70b81ff98d838a08992193b07 to your computer and use it in GitHub Desktop.
// Replace the story name in the source file
this.storyFormat.source = this.storyFormat.source.replace("{{STORY_NAME}}", this.story.name);
// Replace the story data
this.storyFormat.source = this.storyFormat.source.replace("{{STORY_DATA}}", this.storyData);
this.outputContents += this.storyFormat.source
// Write the entire contents out
fs.writeFileSync(file, this.outputContents);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment