Files
web/envdev.py
2026-07-01 10:59:23 +07:00

15 lines
488 B
Python

def search_text(file, text, new_text):
f = open(file, 'r', newline='\n')
content = f.read()
print(text, content.find(new_text))
content = content.replace(text, new_text)
f.close()
with open(file, 'w', newline='\n') as f:
f.write(content)
file = './app/plugins/02-connection.js'
text1 = 'mode = "prod"'
newtext1 = 'mode = "dev"'
search_text(file, text1, newtext1)
file = './app/stores/index.js'
search_text(file,'defineStore("erp"','defineStore("erp-dev"')