We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I guess my issue is related to double quote strings.
index.js
"use strict"; // REST OF THE FILE
I need to add a require() after the "use strict";, so it will become:
require()
"use strict";
"use strict"; require("module-alias/register"); // REST OF THE FILE
I'm trying to enclose the double quotes with single quotes:
npx replace-in-files --string='"use strict";' --replacement='"use strict";\nrequire("module-alias/register");'
Is it something possible to do?
The text was updated successfully, but these errors were encountered:
You simply need to escape the double quote with a slash.
Sorry, something went wrong.
Hi @cbdeveloper,
This is my case in package.json script working great :
"replace:config": "replace-in-files --regex='version=\\\"\\d+\\.\\d+\\.\\d+\\\"+' --replacement=version=\\\"$npm_package_version\\\" config.xml"
No branches or pull requests
I guess my issue is related to double quote strings.
index.js
I need to add a
require()
after the"use strict";
, so it will become:I'm trying to enclose the double quotes with single quotes:
Is it something possible to do?
The text was updated successfully, but these errors were encountered: