Last active
May 10, 2018 15:05
-
-
Save et/39a8ee4e1a9485b47858084e0e7e6402 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
original = "const logger = require('../lib/logger');" | |
replacement = "const { Logger } = require('@neatcapital/logger');\nconst logger = new Logger(__filename);" | |
Dir.glob('./config/*.js') do |filename| | |
text = File.read(filename) | |
text.gsub!(original, replacement) | |
File.open(filename, 'w') { |file| file.puts text } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment