<!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> Following the Design Doc for the new Ionic Design System, an architecture for Design Tokens was added. 1. Added new `foundations` folder inside the `src`, to hold all the tokens related files. 2. On this file, a json with all the tokens for the new Design System was added. The format followed was the one suggested on the [W3C draft](https://design-tokens.github.io/community-group/format/). 3. Added a dev dependency for [Styles Dictionary](https://amzn.github.io/style-dictionary/#/), version 3.9.2. 4. Added a tokens.js script that will take care of transforming the json tokens into the desired output. For now, three files are being generated: ionic.vars.css (:root with all CSS Variables); ionic.vars.css (scss variables for each token) and ionic.utility.css (a new utility-class for each token) 5. Added the script `npm run build.tokens` to package.json, that will generate the three files mentioned above. For now, all these changes bring no impact to the rest of the Framework, as these variables are not yet being consumed. The `margin`, `padding` and `border-radius` were removed from the prohibited properties on lint, to prevent lint errors with the new utility-classes. This is very open to discussion/feedback if it's seen as not ok. The `build` command now includes the `build.tokens` script, to make sure the files are always generated, in case someone forget to run the command, after changing the json file! ## 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. 6. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> --------- Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Build
1. Clone ionic
git@github.com:ionic-team/ionic.git
cd ionic
2. Run npm install
cd core npm install
Notice that @ionic/core lives in core.
3. Run npm start
Make sure you are inside the core directory.
npm start
With the dev command, Ionic components will be built with Stencil, changes to source files are watched, a local http server will startup, and http://localhost:3333/ will open in a browser.
4. Preview
Navigate to http://localhost:3333/src/components/. Each component has small e2e apps found in the test directory, for example: http://localhost:3333/src/components/button/test/basic
As changes are made in an editor to source files, the e2e app will live-reload.
How to contribute
-
npm startallows you to modify the components and have live reloading, just like another ionic app. -
When everything looks good, run
npm run validateto verify the tests linter and production build passes.
Deploy
npm run prepare.deploy- Review/update changelog
- Commit updates using the package name and version number as the commit message.
npm run deploy- 🎉