Bug
injectVueBadge() in utils/installer.js only injects the openCeltrix function when it matches a <script setup lang="ts"> block:
content.replace(
/<script setup lang="ts">([\s\S]*?)<\/script>/,
...
)
The create-vue JavaScript template (used when --language javascript) generates <script setup> without lang="ts". So for JS MEVN projects the openCeltrix helper is never added, yet the badge button that calls it is always injected:
<button className="powered-badge" @click="openCeltrix">Powered by ...
Two consequences:
- Clicking the "Powered by Celtrix" badge throws
ReferenceError: openCeltrix is not defined in every JavaScript MEVN / MEVN+tailwind+auth project (mevnSetup, mevnTailwindAuthSetup).
- The injected button uses
className (React JSX style) inside a Vue template, where the attribute must be class. Vue renders className as a literal attribute, so the .powered-badge CSS class never applies — the badge is unstyled in both TS and JS projects.
Note BADGE_VUE in utils/shared.js:99 already contains the correct class="powered-badge" markup, but it is dead code — injectVueBadge hardcodes its own className string instead of using it.
Reproduction
celtrix create → choose mevn stack, language javascript
cd <project>/client && npm run dev
- Click the "Powered by Celtrix" badge in
HelloWorld.vue
Expected
Badge click opens the Celtrix GitHub repo; badge styled correctly in both JS and TS Vue projects.
Actual
ReferenceError: openCeltrix is not defined (JS) / unstyled badge (all).
Suggested fix
- Make the script-setup regex match
<script setup> with or without lang="ts".
- Use
class= (or :class) instead of className= in the injected Vue button — prefer reusing BADGE_VUE.
Environment
celtrix v3.0.1
- Node 18/20
Bug
injectVueBadge()inutils/installer.jsonly injects theopenCeltrixfunction when it matches a<script setup lang="ts">block:The
create-vueJavaScript template (used when--language javascript) generates<script setup>withoutlang="ts". So for JS MEVN projects theopenCeltrixhelper is never added, yet the badge button that calls it is always injected:Two consequences:
ReferenceError: openCeltrix is not definedin every JavaScript MEVN / MEVN+tailwind+auth project (mevnSetup,mevnTailwindAuthSetup).className(React JSX style) inside a Vue template, where the attribute must beclass. Vue rendersclassNameas a literal attribute, so the.powered-badgeCSS class never applies — the badge is unstyled in both TS and JS projects.Note
BADGE_VUEinutils/shared.js:99already contains the correctclass="powered-badge"markup, but it is dead code —injectVueBadgehardcodes its ownclassNamestring instead of using it.Reproduction
celtrix create→ choosemevnstack, languagejavascriptcd <project>/client && npm run devHelloWorld.vueExpected
Badge click opens the Celtrix GitHub repo; badge styled correctly in both JS and TS Vue projects.
Actual
ReferenceError: openCeltrix is not defined(JS) / unstyled badge (all).Suggested fix
<script setup>with or withoutlang="ts".class=(or:class) instead ofclassName=in the injected Vue button — prefer reusingBADGE_VUE.Environment
celtrixv3.0.1