@md-plugins/md-plugin-link 0.1.0-alpha.1 → 0.1.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2024-present, Jeff Galbraith
3
+ Copyright (c) 2024-present, MD-PLUGINS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -64,7 +64,7 @@ For the example above, the plugin produces the following output:
64
64
  Additionally, the `pageScripts` property in the `env` object will contain:
65
65
 
66
66
  ```js
67
- Set(['import MarkdownLink from "src/components/md/MarkdownLink.vue";']);
67
+ Set(['import MarkdownLink from "src/components/md/MarkdownLink.vue";'])
68
68
  ```
69
69
 
70
70
  ## Options
package/dist/index.mjs CHANGED
@@ -18,9 +18,7 @@ const linkPlugin = (md, {
18
18
  link[0] = linkToKeyword;
19
19
  link[1] = decodeURI(url);
20
20
  if (pageScript) {
21
- if (!env.pageScripts) {
22
- env.pageScripts = /* @__PURE__ */ new Set();
23
- }
21
+ env.pageScripts = env.pageScripts || /* @__PURE__ */ new Set();
24
22
  env.pageScripts.add(pageScript);
25
23
  }
26
24
  return self.renderToken(tokens, idx, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/md-plugin-link",
3
- "version": "0.1.0-alpha.1",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "A markdown-it plugin for handling links.",
5
5
  "keywords": [
6
6
  "markdown-it",
@@ -33,16 +33,21 @@
33
33
  "./dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@types/markdown-it": "^14.1.2",
37
36
  "markdown-it": "^14.1.0",
38
- "@md-plugins/shared": "0.1.0-alpha.1"
37
+ "@md-plugins/shared": "0.1.0-alpha.5"
38
+ },
39
+ "devDependencies": {
40
+ "@types/markdown-it": "^14.1.2"
41
+ },
42
+ "peerDependencies": {
43
+ "markdown-it": "^14.1.0"
39
44
  },
40
45
  "publishConfig": {
41
46
  "access": "public"
42
47
  },
43
48
  "scripts": {
44
49
  "build": "unbuild",
45
- "clean": "rm -rf dist",
50
+ "clean": "rm -rf dist/ node_modules/",
46
51
  "test": "vitest"
47
52
  }
48
53
  }