Skip to content

Commit

Permalink
remove a few unused code, adjust gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Mar 30, 2023
1 parent 9add1b8 commit ebbfa78
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -25,6 +25,8 @@ experiment-*
.eslintcache
Thumbs.db
.idea/
*.vsix
.vscode/*

src/generated.ts
src/configurationTypeCache.jsonc
10 changes: 0 additions & 10 deletions src/patch.ts
Original file line number Diff line number Diff line change
@@ -159,16 +159,6 @@ const doPatchInner = async (config: any) => {
fs.writeFileSync(fileToPatch, text, 'utf8')

function injectScriptContents(offset: number, inject: string) {
// <injected before>|<inject end marker>
// if (text.slice(offset).startsWith(injectMarkers[1])) {
// const endMarkerPos = offset
// offset = text.slice(0, offset).lastIndexOf(injectMarkers[0])
// text = text.slice(0, offset) + text.slice(endMarkerPos + injectMarkers[1].length)
// }
// // |<injected after>
// if (text.slice(offset).startsWith(injectMarkers[0])) {
// text = text.slice(0, offset) + text.slice(text.slice(offset).indexOf(injectMarkers[1] + injectMarkers[1].length))
// }
if (!inject) return
text =
text.slice(0, offset) +

0 comments on commit ebbfa78

Please sign in to comment.