Skip to content

Add root TypeScript exports while preserving explicit stylesheet imports - #28

Merged
bklaing2 merged 7 commits into
mainfrom
copilot/implement-ts-constants-import
Jul 15, 2026
Merged

bklaing2 merged 7 commits into
mainfrom
copilot/implement-ts-constants-import

Conversation

Copilot AI commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

This updates maltipoo from a stylesheet-only package to a dual-purpose package: root imports now resolve to a JS/TS module for shared constants, while compiled CSS remains available via explicit stylesheet subpaths. Existing dist/stylesheets outputs are preserved, and package exports now define the supported import surface directly.

  • Package entrypoints

    • Change the package root to resolve to dist/index.js with dist/index.d.ts typings
    • Add explicit exports for stylesheet assets:
      • maltipoo/stylesheets/doi.css
      • maltipoo/stylesheets/doi.min.css
    • Preserve compatibility for explicit legacy paths under maltipoo/dist/stylesheets/*
  • TypeScript constants

    • Add a minimal src/index.ts entrypoint
    • Export initial named constants derived from existing DataCite brand colors:
      • DATACITE_PRIMARY_DARK_BLUE
      • DATACITE_PRIMARY_LIGHT_BLUE
  • Build output

    • Add a TypeScript build step that emits:
      • dist/index.js
      • dist/index.d.ts
    • Keep the existing Sass/PostCSS stylesheet build unchanged in output location:
      • dist/stylesheets/doi.css
      • dist/stylesheets/doi.min.css
  • Documentation

    • Update the README to show:
      • root constant imports from maltipoo
      • stylesheet imports from maltipoo/stylesheets/doi.min.css
      • continued availability of explicit dist/stylesheets imports

Example usage:

import {
  DATACITE_PRIMARY_DARK_BLUE,
  DATACITE_PRIMARY_LIGHT_BLUE,
} from "maltipoo";

import "maltipoo/stylesheets/doi.min.css";

Copilot AI changed the title [WIP] Add support for importing TypeScript constants from package root Add root TypeScript exports while preserving explicit stylesheet imports Jul 15, 2026
Copilot AI requested a review from bklaing2 July 15, 2026 14:47
Comment thread package.json
@github-actions
github-actions Bot force-pushed the copilot/implement-ts-constants-import branch from 7556157 to e606ce9 Compare July 15, 2026 18:21
@bklaing2
bklaing2 marked this pull request as ready for review July 15, 2026 18:22
@datacite datacite deleted a comment from Copilot AI Jul 15, 2026
@bklaing2
bklaing2 merged commit f83a921 into main Jul 15, 2026
2 checks passed
@bklaing2
bklaing2 deleted the copilot/implement-ts-constants-import branch July 15, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants