Skip to content

Commit

Permalink
Use relative resolver for nodejs plugin (OctoLinker#840)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Buck <[email protected]>
  • Loading branch information
stefanbuck and Stefan Buck authored Mar 11, 2020
1 parent a9e8e20 commit fa30637
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/plugin-nodejs-relative-path/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import {
} from '@octolinker/helper-grammar-regex-collection';
import JavaScript from '@octolinker/plugin-javascript';
import TypeScript from '@octolinker/plugin-typescript';
import relativeFile from '@octolinker/resolver-relative-file';

export default {
name: 'NodejsRelativePath',

resolve(path, [target]) {
return `{BASE_URL}${join(dirname(path), target)}`;
return relativeFile({ path, target });
},

getPattern() {
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-nodejs-relative-path/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dependencies": {
"@octolinker/plugin-javascript": "1.0.0",
"@octolinker/plugin-typescript": "1.0.0",
"@octolinker/resolver-relative-file": "1.0.0",
"@octolinker/helper-grammar-regex-collection": "1.0.0"
}
}

0 comments on commit fa30637

Please sign in to comment.