Package Exports
- replace-in-path
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (replace-in-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Install
npm install replace-in-path --save-devOr if you prefer yarn:
yarn add replace-in-path --devQuick Example:
const codeReplacements = [
{
find: `const { security } = this.context;`,
replaceWith: `// const { security } = this.context;`,
},
{
find: "const identity = await security.getIdentity",
replaceWith: "// const identity = await security.getIdentity",
},
{
find: new RegExp("createdBy: identity.*},", "gms"),
replaceWith: "/* $& */",
},
];
replaceInPath(
path.join(newCodePath, "/resolvers/TargetDataModelsMutation.ts"),
codeReplacements
);