'How to replace variable value in js file using powershell
I have a java script file called require.config.js
There is a variable in it called "waitSeconds" with a value of 15 and I want to replace the 15 with a 60 - using powershell. I know I could use replace to replace 15 with 60 - but I don't know that the value will always be 15. So I want to replace the value for "waitSeconds"
Here's an example of the file - want to change whatever the value for "waitSeconds" is (in this case 15) - to a different value -ie 60
require.config({
"waitSeconds": 15,
"unitTestUser": {
"Username": "user",
"Password": "password"
},
"paths": {
"modules": "modules",
"semantic-ui": "client/ui/semantic-ui/semantic",
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
