create-deck-plugin 1.11.1 → 1.12.1
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/id.mjs +2 -2
- package/package.json +1 -1
- package/template/plugin.json +1 -1
package/id.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// A plugin's id from the name someone typed. The id is a config key and a path component in Deck,
|
|
2
2
|
// so it is letters, digits and dashes, starting with a letter or digit; "" when nothing usable is
|
|
3
|
-
// left. Deck's "Create a plugin" makes the same id (src/core/pluginid.ts), and
|
|
4
|
-
// src/core/pluginid.check.mjs holds the two to each other.
|
|
3
|
+
// left. Deck's "Create a plugin" makes the same id (src/core/plugins/pluginid.ts), and
|
|
4
|
+
// src/core/plugins/pluginid.check.mjs holds the two to each other.
|
|
5
5
|
export const pluginId = (raw) => {
|
|
6
6
|
const id = raw.trim().toLowerCase().replace(/[^a-z0-9-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
7
7
|
return /^[a-z0-9]/.test(id) ? id : "";
|
package/package.json
CHANGED