Commit Graph

24 Commits

Author SHA1 Message Date
Kshitij Sobti b46e241866
feat: Better support for multiple themes (#2792)
* feat: Better support for multiple themes

This change adds support for two CLI options to the build-tokens
command.

The first, --all-themes makes the build-tokens command process all
themes in the source directory as opposed to specifying all the names
via --theme.

Secondly, --base-paragon-theme allows you to have multiple themes derived
from the same common base. If specified, you can have a derived theme that
still loads tokens from the light theme. For example, you can have a
site theme called 'theme-one' and set the base theme to light so it will
reuse the core light theme tokens and layer on changes from 'theme-one'.

* fixup! feat: Better support for multiple themes

* fixup! fixup! feat: Better support for multiple themes
2025-11-03 10:21:24 -05:00
Brian Smith 51fefc5eff
fix(cli): ensure style dictionary verbose error stack is displayed (#3961) 2025-10-29 19:14:55 -04:00
Maxwell Frank 62e65ca9af
feat: add serve-theme-css command to Paragon CLI
Improves the developer experience (DX) around local development for brand packages to be able to serve their built CSS files as if they were hosted on a CDN for use in the recently updated Paragon documentation website theme selector that allows users to create custom themes with external CSS URLs.

Brand packages may now run `paragon serve-theme-css --theme-name "Custom Theme Name"` to generate a Paragon documentation website URL with the local CSS files applied.

---------

Co-authored-by: Adam Stankiewicz <agstanki@gmail.com>
2025-07-03 11:31:15 -04:00
Brian Smith 908fe823e1
feat(cli): add `excludeCore` flag for `build-scss` (#3606) 2025-05-22 14:41:32 -04:00
Brian Smith 5c954736c5
feat(cli): add `exclude-core` flag (#3603) 2025-05-22 12:10:48 -04:00
Peter Kulko 20b433eb76
chore: added tests for Paragon CLI (#3498)
* chore: added tests for Paragon CLI

* refactor: after review
2025-05-14 10:13:04 +03:00
Peter Kulko 1379ebe347
fix: fixed parsing of --themes option in build-tokens CLI command (#3473) 2025-03-14 14:55:00 -04:00
Brian Smith 69e4fb12fe
fix: Changed type for design token print-page-size (#3400)
* fix: fixed design tokens build

* refactor: updated style-dictionary version

---------

Co-authored-by: PKulkoRaccoonGang <peter.kulko@raccoongang.com>
2025-01-28 11:16:09 -05:00
Peter Kulko f243716b10 chore: renamed --output-token-references 2024-11-26 12:15:31 +02:00
Adam Stankiewicz be634dc31a feat: --output-references CLI arg, registers filters, updates CSS vars format (#3203)
* feat: --output-references CLI arg for build-tokens, registers filters, and updates CSS vars format

* Exposes `--output-references` CLI argument for `build-tokens` command. Defaults to `true`. Ensures brand package output with the CLI includes references in build output out-of-the-box.

* Registers filter(s) `isThemeVariant.{'light'}`, handling future theme variants when implemented (e.g., `isThemeVariant.dark`).
* Migrates `createCustomCSSVariables` to use `formattedVariables` to rely on out-of-the-box CSS variable formatting. The formatter still supports token-specific overrides of `outputReferences`. If a token has modifications via `modify`, the modified base reference is not included in the output.
* Updates custom fileHeader implementation, including a relative path to design tokens documentation.
* Fixes bug with line-height tokens, switching their `$type` from `dimension` to `number` to resolve typography style regressions.
* Updates typography tokens related to font size, font weight, and line-height for more consistent naming structure when taking into account mobile.
* Updates `@mobile-type` SCSS mixin to support level-specific customization of mobile typography styles for display 1-4.
* Renames `"description"` field in tokens to `"$description""` per the DTCG format.

* Ensures the "Typography" foundations page properly previews the correct font size for regular "Body" text and includes the missing "HEADING LABEL" example.
* Updates to "Colors" page in docs site:
  * Displays token name instead of CSS variable in the color swatch previews (see screenshot below).
  * Include `accent-a` and `accent-b` alongside other color names, rather than manually rendering `Swatch` for the accents.
  * Modifies the grid styles for color swatch preview to be more responsive.
* Resolves `NaNpx` bug in `MeasuredItem` component on docs site, while computing the measurements to display for an element (e.g., font size). Instead, it renders an empty block while measurements are resolved.
* Updates `CodeBlock` styles on docs site to add its border and background color only to the `LivePreview`, not the entire `CodeBlock` example.
* Reduces whitespace on docs site homepage.
* Simplifies columns on docs site header, ensuring `SiteTitle` is horizontally aligned in the center.
2024-11-26 12:15:31 +02:00
Peter Kulko 9b8b087025 refactor: added dynamic imports 2024-11-26 12:15:31 +02:00
Peter Kulko cae4ee59da feat: update style dictionary to v4 2024-11-26 12:15:31 +02:00
PKulkoRaccoonGang 01c702f73c Merge remote-tracking branch 'origin/master' into Peter_Kulko/alpha-branch-updating 2024-05-07 19:38:07 +03:00
srwang f5a5c057a7
feat: move utils away from root directory (#3028)
Co-authored-by: srwang <srwang@users.noreply.github.com>
2024-04-03 11:17:14 -04:00
Peter Kulko 6927788daa
feat: added CLI command to migrate to using `openedx` scope (#2984)
* feat: added migration command to new openedx-paragon npm package

* chore: add default path to the cli

---------

Co-authored-by: Viktor Rusakov <vrusakov66@gmail.com>
2023-12-29 17:57:43 +02:00
PKulkoRaccoonGang 3309eb471b Merge remote-tracking branch 'origin/master' into HEAD 2023-12-15 14:11:44 +02:00
Peter Kulko 8ef95bc4bf
feat: added Paragon CLI version command (#2921)
* feat: added Paragon CLI version command

* refactor: refactoring after review
2023-12-13 16:32:45 +02:00
PKulkoRaccoonGang e1c00b27f0 Merge remote-tracking branch 'origin/master' into HEAD
# Conflicts:
#	package-lock.json
#	www/package.json
#	www/src/scss/openedx-theme.scss
2023-11-10 13:50:31 +02:00
Peter Kulko 9af9a64f94
feat: added Segment track for CLI scripts (#2617)
* feat: added Segment track for CLI scripts

* refactor: refactoring after review

* refactor: refactoring after review

* refactor: refactoring after review

* refactor: code refactoring
2023-11-09 10:15:02 +02:00
monteri 75580fdca6
feat: move design tokens CLI commands to paragon CLI (#2609)
* feat: move cli design tokens to paragon cli

* feat: update paths for build-tokens.js

* feat: added descriptions for CLI commands

* refactor: removed commander implementation

* refactor: added build-scss process status

* feat: added ora compilation status

* refactor: code refactoring

* feat: added help description for single command

* refactor: after review

* refactor: refactoring after review

* chore: update docs and cli params parsing

---------

Co-authored-by: monteri <lansevermore>
Co-authored-by: PKulkoRaccoonGang <peter.kulko@raccoongang.com>
Co-authored-by: Viktor Rusakov <vrusakov66@gmail.com>
2023-10-30 15:05:50 +02:00
Feanil Patel 6719baa33f
fix: Update imports to the new brand package.
The scope changed so we update any place the old package
was being imported explicitly.
2023-10-19 15:13:24 -04:00
monteri c7780612d7
feat: add help command for Paragon CLI (#2603)
* feat: help command for Paragon CLI

* feat: remove console log

* feat: PR comments update

* feat: update commands code

---------

Co-authored-by: monteri <lansevermore>
2023-09-20 11:57:03 +03:00
Adam Stankiewicz 4ec284a059
fix: move install-theme.js to lib directory (#2560) 2023-08-18 08:47:39 -04:00
monteri 33a7c74415
feat: [BD-46] add paragon-cli (#2460)
Exposes a `paragon` CLI with an `install-theme` command.

Example usage in `package.json`:

```
{
  "scripts": {
    "start:with-theme": "paragon install-theme && npm start",
    "build:with-theme": "paragon install-theme && npm run build"
  }
}
```

The Paragon CLI will prompt from which NPM package you wish to install as the `@edx/brand` package (e.g., `@edx/brand-edx.org@latest`), and install it without modifying the `package.json` or `package-lock.json` files.

Additional commands will be added to the `paragon` CLI tool in the future.
2023-08-18 07:22:43 -04:00