Bernardo Cardoso 9f546ede3d feat(tokens): modernize scripts and change prefix to token (#30666)
Issue number: internal

---------

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
This pull request updates the design token build pipeline to support
Style Dictionary v5 and modernizes the scripts by migrating them to ES
modules. The changes ensure compatibility with the latest dependencies
and improve maintainability by refactoring the build scripts and
utilities.

**Dependency and Build Pipeline Updates:**

* Upgraded `outsystems-design-tokens` to version `^1.3.2` and
`style-dictionary` to version `^5.0.0` in `package.json` to support the
latest features and fixes.
* Updated the `build.tokens` npm script to use the new ES module entry
point (`index.mjs`) instead of the old CommonJS file (`index.js`).

**Migration to ES Modules:**

* Migrated the main design token build script from `index.js` to
`index.mjs`, refactoring imports/exports and adjusting to Style
Dictionary v5 API changes.
[[1]](diffhunk://#diff-80accbbc258884565c215c7eb6280722805ddf618d72bf6506c7dd1fb7faaa54L1-L201)
[[2]](diffhunk://#diff-0b9870c62ff80af860467e2541bba0b9ba5e7280b12bea6eeb124b1d174efbcfR1-R194)
* Renamed and refactored the utility functions file from `utils.js` to
`utils.mjs`, converting all utility functions to ES module exports for
compatibility.
[[1]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL4-R10)
[[2]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL22-R22)
[[3]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL47-R53)
[[4]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL65-R65)
[[5]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL76-R76)
[[6]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL85-R85)
[[7]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL95-R95)
[[8]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL118-R118)
[[9]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL144-R144)
[[10]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL155-R155)
[[11]](diffhunk://#diff-8b5c339d9dd13300954577213f84a443321a0d6477acd7553787fbcc00ce8cabL221-R221)

**Style Dictionary Configuration and Output Improvements:**

* Adjusted the Style Dictionary configuration and format registration to
match the new API, including changes to file header handling and output
structure for SCSS variables and utility classes.

* Changed variable prefix to --token

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer
for more information.
-->

---------

Co-authored-by: ionitron <hi@ionicframework.com>
2025-09-05 15:35:47 +01:00
2015-11-13 21:11:21 -06:00
2025-08-20 18:36:46 +00:00
2025-08-20 18:36:46 +00:00
2025-04-16 17:38:18 +00:00

Ionic

Ionic

Ionic is an open source app development toolkit for building modern, fast, top-quality cross-platform native and Progressive Web Apps from a single codebase with JavaScript and the Web.

Ionic is based on Web Components, which enables significant performance, usability, and feature improvements alongside support for popular web frameworks like Angular, React, and Vue.

Ionic Framework is released under the MIT license. PRs welcome! Follow @IonicFramework Official Ionic Discord

Quickstart · Documentation · Contribute · Blog
Community: Discord · Forums · Twitter

Packages

Project Package Version Downloads Links
Core @ionic/core version NPM Downloads README.md
Angular @ionic/angular version NPM Downloads README.md
Vue @ionic/vue version NPM Downloads README.md
React @ionic/react version NPM Downloads README.md

Looking for the ionic-angular package? Ionic 3 has been moved to the ionic-v3 repo. See Earlier Versions.

Getting Started

Start a new project by following our documentation. We would love to hear from you! If you have any feedback or run into issues using our framework, please file an issue on this repository.

Migration Guides

Already have an Ionic app? These guides will help you migrate to the latest versions.

Examples

The Ionic Conference App is a full featured Ionic app. It is the perfect starting point for learning and building your own app.

Contributing

Thanks for your interest in contributing! Read up on our guidelines for contributing and then look through our issues with a help wanted label.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Earlier Versions

The source code for earlier versions of the Ionic Framework may exist in other repositories. Please open issues and pull requests in their respective repositories.

Description
A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
Readme MIT 2.4 GiB
Languages
TypeScript 60.5%
HTML 25.2%
SCSS 10.8%
JavaScript 2%
Vue 1%
Other 0.5%