You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @deprecated Make your own version of this template if you need it - we think it isn't widely used so will remove it from the next version of code-input.
# $0 is the template name, $1 is the autogenerated notice
52
54
'"%""$AUTOGENERATED_NOTICE"
@@ -57,9 +59,9 @@ mkdir -p templates
57
59
echo "" >> templates/$0.d.mts;
58
60
# Imports
59
61
echo "import { Template, Plugin } from \"../code-input.d.mts\";" >> templates/$0.d.mts
60
-
# Code after start and before end of this template, making use of the imported Template, not codeInput.Template, and the imported Plugin, not codeInput.Plugin, exporting the function as default
61
-
# export default function replacement should work but won"t leave indentation as JS version does.
62
-
head -$(($(sed -n "/ESM-SUPPORT-END-TEMPLATE-$0/=" ../code-input.d.ts | head -1) - 1)) ../code-input.d.ts | tail --line=+$(($(sed -n "/ESM-SUPPORT-START-TEMPLATE-$0/=" ../code-input.d.ts | head -1) + 1)) | sed "s/codeInput\.Template/Template/g" | sed "s/codeInput\.Plugin/Plugin/g" | sed -E "s/^[[:space:]]*function /export default function /" >> templates/$0.d.mts
62
+
# Code after start and before end of this template, making use of the imported Template, not codeInput.Template, and the imported Plugin, not codeInput.Plugin, exporting the class as default
63
+
# export default class replacement should work but won"t leave indentation as JS version does.
64
+
head -$(($(sed -n "/ESM-SUPPORT-END-TEMPLATE-$0/=" ../code-input.d.ts | head -1) - 1)) ../code-input.d.ts | tail --line=+$(($(sed -n "/ESM-SUPPORT-START-TEMPLATE-$0/=" ../code-input.d.ts | head -1) + 1)) | sed "s/codeInput\.Template/Template/g" | sed "s/codeInput\.Plugin/Plugin/g" | sed -E "s/^[[:space:]]*class /export default class /" >> templates/$0.d.mts
63
65
64
66
# $0 is the template name, $1 is the autogenerated notice
0 commit comments