Skip to content

Add load-order validation script to catch missing or misordered script tags #47

Description

@zntznt

Problem

index.html loads 17 scripts in strict dependency order. A misordered <script> tag causes silent failures (classes undefined, mixins load before App exists). There's no automated check. The CLI (cli.js) and test runner (test/run.js) replicate the load order manually — if a file is added to js/ but not to these lists, it's silently excluded.

Plan

Add a small Node script scripts/check-load-order.js that:

  1. Parses <script src="js/..."> tags from index.html in order
  2. Lists all js/*.js files on disk
  3. Reports:
    • Files on disk NOT in index.html (unused or forgotten)
    • Files in index.html NOT on disk (broken links)
    • Mixin scripts that come before app.js (load-order violation)
    • Duplicate <script> tags

Run as a pre-test or CI step:

node scripts/check-load-order.js
# Exit 1 if violations found

Effort

~1 hour. New file only. ~40 lines of Node.js.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions