Skip to content

Stamp dist bundles with an MIT license notice using a minifier-safe /*! header #482

Description

@jackgranatowski

Problem

The dist bundle headers currently read:

/* SLASHED v0.6.33 — slashed.optimal.css */

Two issues:

  1. No license notice. MIT's only real requirement is that the copyright + permission notice travels with the code. Consumers who copy a bundle (including the WordPress plugin, which redistributes these files under a GPL-3 plugin) get no in-file indication of the license.
  2. The comment is stripped on minification. A plain /* … */ header is removed by minifiers, so .min.css files carry no attribution at all.

Proposed fix

Follow the convention used by normalize.css and similar libraries — a bang comment, which minifiers preserve:

/*! SLASHED v0.6.33 | MIT License | github.com/codeslash-dev/SLASHED */

Scope

  • scripts/bundle.js — change the stamp format for all emitted bundles (readable, .min, and .flat variants).
  • release.yml verifies the stamp version against package.json before publishing — the check needs updating to match the new header format.
  • CLAUDE.md references the /* SLASHED vX.Y.Z */ header format in the version-sync table; update the wording.
  • Check whether scripts/check-version-sync.js and any tests (e.g. bundle/docs sync tests) parse the current header format.

Follow-up (SLASHED-Plugins)

After this ships in a framework release, npm run update-framework in SLASHED-Plugins picks up the stamped bundles automatically — no plugin-side change needed, but worth confirming nothing there parses the old header format either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions