From f7a4a4def27afde3dcf7a3efd0a3fb36da162e31 Mon Sep 17 00:00:00 2001 From: Gonzalo Uceda Date: Mon, 3 Oct 2022 14:11:30 +0200 Subject: [PATCH] feat!: universal rename `dali`-> `genesys` --- .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 2 +- README.md | 26 ++++++++--------- brand-devo/README.md | 8 +++--- brand-devo/package.json | 16 +++++------ package-lock.json | 40 +++++++++++++-------------- package.json | 2 +- tokens-cli/README.md | 22 +++++++-------- tokens-cli/build/commands/build.js | 6 ++-- tokens-cli/build/commands/validate.js | 6 ++-- tokens-cli/package.json | 12 ++++---- tokens-cli/src/commands/build.ts | 4 +-- tokens-cli/src/commands/validate.ts | 4 +-- tokens/README.md | 6 ++-- tokens/package.json | 6 ++-- 15 files changed, 81 insertions(+), 81 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 263c774..6e6a1d3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,7 +162,7 @@ jobs: - name: Post Stryker run: | cd mutation-test-results - cp /home/runner/work/dali-tokens/dali-tokens/tokens/reports/mutation/mutation.html stryker-report.html + cp /home/runner/work/genesys-tokens/genesys-tokens/tokens/reports/mutation/mutation.html stryker-report.html cd .. - name: Upload artifact with results uses: actions/upload-artifact@v3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dfe3cd7..9dc354c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,7 @@ Please ensure you have read the [Code of Conduct](./CODE_OF_CONDUCT.md) before m Contributions are made by opening pull requests from a forked copy of the repo. See detailed instructions below. -- Create a fork from the project on [Github](https://github.com/devoinc/dali-tokens). +- Create a fork from the project on [Github](https://github.com/devoinc/genesys-tokens). - Clone the fork on your local machine. - Add the original repository as remote `upstream`. - Create a new `feat/` branch from `master`. diff --git a/README.md b/README.md index 4500190..95c78cf 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ -# Dali Tokens +# Genesys Tokens -![license](https://img.shields.io/github/license/devoinc/dali-tokens) -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/devoinc/dali-tokens/ci)](https://github.com/devoinc/dali-tokens/actions/workflows/ci.yml) +![license](https://img.shields.io/github/license/devoinc/genesys-tokens) +[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/devoinc/genesys-tokens/ci)](https://github.com/devoinc/genesys-tokens/actions/workflows/ci.yml) Monorepo containing a set of packages devoted to the generation of design tokens defined by Devo's *Dalí Design System*. The project is built using `npm workspaces` and contains the following packages: -[![npm version](https://img.shields.io/npm/v/@devoinc/dali-tokens?label=%40devoinc%2Fdali-tokens)](https://www.npmjs.com/package/@devoinc/dali-tokens) -[![npm version](https://img.shields.io/npm/v/@devoinc/dali-tokens-cli?label=%40devoinc%2Fdali-tokens-cli)](https://www.npmjs.com/package/@devoinc/dali-tokens-cli) -[![npm version](https://img.shields.io/npm/v/@devoinc/dali-brand-devo?label=%40devoinc%2Fdali-brand-devo)](https://www.npmjs.com/package/@devoinc/dali-brand-devo) +[![npm version](https://img.shields.io/npm/v/@devoinc/genesys-tokens?label=%40devoinc%2Fgenesys-tokens)](https://www.npmjs.com/package/@devoinc/genesys-tokens) +[![npm version](https://img.shields.io/npm/v/@devoinc/genesys-tokens-cli?label=%40devoinc%2Fgenesys-tokens-cli)](https://www.npmjs.com/package/@devoinc/genesys-tokens-cli) +[![npm version](https://img.shields.io/npm/v/@devoinc/genesys-brand-devo?label=%40devoinc%2Fgenesys-brand-devo)](https://www.npmjs.com/package/@devoinc/genesys-brand-devo) - **tokens:** Tokens definition and generation tools. - **tokens-cli:** Command-line interface for the token generation tools. @@ -19,11 +19,11 @@ The project is built using `npm workspaces` and contains the following packages: The packages have the following interdependencies: ``` -├─┬ @devoinc/dali-brand-devo -│ └── @devoinc/dali-tokens-cli -├─┬ @devoinc/dali-tokens-cli -│ ├── @devoinc/dali-tokens -├─┬ @devoinc/dali-tokens +├─┬ @devoinc/genesys-brand-devo +│ └── @devoinc/genesys-tokens-cli +├─┬ @devoinc/genesys-tokens-cli +│ ├── @devoinc/genesys-tokens +├─┬ @devoinc/genesys-tokens ``` ## Quick start @@ -32,9 +32,9 @@ The packages have the following interdependencies: ```sh ## Clone the repository -git clone https://github.com/devoinc/dali-tokens +git clone https://github.com/devoinc/genesys-tokens ## Go to folder -cd dali-tokens +cd genesys-tokens ## Install dependencies npm ci ## Generate tokens for Devo's brand diff --git a/brand-devo/README.md b/brand-devo/README.md index f3894e8..2b650fe 100644 --- a/brand-devo/README.md +++ b/brand-devo/README.md @@ -1,24 +1,24 @@ -# Dali Brand Devo +# Genesys Brand Devo _Devo_'s main brand schemes of design tokens defined by _Dalí Design System_. This package contains the brand schemes as `json` files, required to generate Devo's **light** and **dark** brands. -A preview of the generated tokens can be found in [devoinc/dali-tokens](https://devoinc.github.io/dali-tokens/). +A preview of the generated tokens can be found in [devoinc/genesys-tokens](https://devoinc.github.io/genesys-tokens/). ## Usage To access the generated brands one just needs to import the package and access the `Brands` object. ```typescript -import * as brands from "@devoinc/dali-brand-devo"; +import * as brands from "@devoinc/genesys-brand-devo"; console.log(brands.light.cmp.appBar); ``` ## Quick start -To generate the brands from the available schemas, this project uses the `dit` CLI from [@devoinc/dali-tokens-cli](https://github.com/DevoInc/dali-tokens/tree/master/tokens-cli). Please refer to the `dit` package [documentation](https://github.com/DevoInc/dali-tokens/blob/master/tokens-cli/README.md) for further information. +To generate the brands from the available schemas, this project uses the `gyt` CLI from [@devoinc/genesys-tokens-cli](https://github.com/DevoInc/genesys-tokens/tree/master/tokens-cli). Please refer to the `gyt` package [documentation](https://github.com/DevoInc/genesys-tokens/blob/master/tokens-cli/README.md) for further information. ```sh ## Go to package directory diff --git a/brand-devo/package.json b/brand-devo/package.json index 24ee146..26f2ee6 100644 --- a/brand-devo/package.json +++ b/brand-devo/package.json @@ -1,5 +1,5 @@ { - "name": "@devoinc/dali-brand-devo", + "name": "@devoinc/genesys-brand-devo", "version": "2.0.1", "author": "Devo Dev Team", "license": "MIT", @@ -9,18 +9,18 @@ "scripts": { "clean": "rm -rf dist/light dist/dark", "build": "npm run build:light && npm run build:dark", - "build:light": "dit build -i schemes/light -o dist/light -m dark", - "build:dark": "dit build -i schemes/dark -o dist/dark -s dark -m dark", + "build:light": "gyt build -i schemes/light -o dist/light -m dark", + "build:dark": "gyt build -i schemes/dark -o dist/dark -s dark -m dark", "validate": "npm run validate:light && npm run validate:dark", - "validate:light": "dit validate dist/light/", - "validate:dark": "dit validate dist/dark/", + "validate:light": "gyt validate dist/light/", + "validate:dark": "gyt validate dist/dark/", "dist": "npm run clean && npm run build && npm run validate" }, "files": [ "dist" ], "keywords": [ - "dali", + "genesys", "design", "tokens", "brand", @@ -28,10 +28,10 @@ ], "repository": { "type": "git", - "url": "git@github.com:DevoInc/dali-tokens.git" + "url": "git@github.com:DevoInc/genesys-tokens.git" }, "dependencies": { - "@devoinc/dali-tokens-cli": "^2.0.1" + "@devoinc/genesys-tokens-cli": "^2.0.1" }, "publishConfig": { "access": "public" diff --git a/package-lock.json b/package-lock.json index 935858b..3f17f3f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "dali-tokens", + "name": "genesys-tokens", "version": "2.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "dali-tokens", + "name": "genesys-tokens", "version": "2.0.1", "license": "MIT", "workspaces": [ @@ -42,11 +42,11 @@ } }, "brand-devo": { - "name": "@devoinc/dali-brand-devo", - "version": "1.0.2", + "name": "@devoinc/genesys-brand-devo", + "version": "2.0.1", "license": "MIT", "dependencies": { - "@devoinc/dali-tokens-cli": "^1.0.2" + "@devoinc/genesys-tokens-cli": "^2.0.1" } }, "node_modules/@ampproject/remapping": { @@ -810,15 +810,15 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@devoinc/dali-brand-devo": { + "node_modules/@devoinc/genesys-brand-devo": { "resolved": "brand-devo", "link": true }, - "node_modules/@devoinc/dali-tokens": { + "node_modules/@devoinc/genesys-tokens": { "resolved": "tokens", "link": true }, - "node_modules/@devoinc/dali-tokens-cli": { + "node_modules/@devoinc/genesys-tokens-cli": { "resolved": "tokens-cli", "link": true }, @@ -13395,25 +13395,25 @@ } }, "tokens": { - "name": "@devoinc/dali-tokens", - "version": "1.0.2", + "name": "@devoinc/genesys-tokens", + "version": "2.0.1", "license": "MIT", "dependencies": { - "quicktype-core": "^6.0.62", + "quicktype-core": "6.0.62", "style-dictionary": "^3.7.1" } }, "tokens-cli": { - "name": "@devoinc/dali-tokens-cli", - "version": "1.0.2", + "name": "@devoinc/genesys-tokens-cli", + "version": "2.0.1", "license": "MIT", "dependencies": { - "@devoinc/dali-tokens": "^1.0.2", + "@devoinc/genesys-tokens": "^2.0.1", "chalk": "^4.1.2", "yargs": "^17.5.1" }, "bin": { - "dit": "build/cli.js" + "gyt": "build/cli.js" }, "devDependencies": { "@types/yargs": "^17.0.10" @@ -14091,13 +14091,13 @@ } } }, - "@devoinc/dali-brand-devo": { + "@devoinc/genesys-brand-devo": { "version": "file:brand-devo", "requires": { - "@devoinc/dali-tokens-cli": "^1.0.2" + "@devoinc/genesys-tokens-cli": "^2.0.1" } }, - "@devoinc/dali-tokens": { + "@devoinc/genesys-tokens": { "version": "file:tokens", "requires": { "quicktype-core": "6.0.62", @@ -14127,10 +14127,10 @@ } } }, - "@devoinc/dali-tokens-cli": { + "@devoinc/genesys-tokens-cli": { "version": "file:tokens-cli", "requires": { - "@devoinc/dali-tokens": "^1.0.2", + "@devoinc/genesys-tokens": "^2.0.1", "@types/yargs": "^17.0.10", "chalk": "^4.1.2", "yargs": "^17.5.1" diff --git a/package.json b/package.json index bd48037..85e0fbc 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "dali-tokens", + "name": "genesys-tokens", "version": "2.0.1", "author": "Devo Dev Team", "license": "MIT", diff --git a/tokens-cli/README.md b/tokens-cli/README.md index 6385517..df71053 100644 --- a/tokens-cli/README.md +++ b/tokens-cli/README.md @@ -1,16 +1,16 @@ -# Dali Tokens CLI +# Genesys Tokens CLI -dali-tokens-cli or `dit`, is a command-line interface that handles generation of style tokens from a set of schemas. `dit` provides a CLI to the scripts available in [@devoinc/dali-tokens](https://github.com/DevoInc/dali-tokens/tree/master/tokens). +genesys-tokens-cli or `gyt`, is a command-line interface that handles generation of style tokens from a set of schemas. `gyt` provides a CLI to the scripts available in [@devoinc/genesys-tokens](https://github.com/DevoInc/genesys-tokens/tree/master/tokens). ## Installation ### npm -You can install `dit` via npm by running: +You can install `gyt` via npm by running: - using published version: ```bash - npm install @devoinc/dali-tokens-cli -g + npm install @devoinc/genesys-tokens-cli -g ``` - usin the local codebase: ```bash @@ -22,17 +22,17 @@ You can install `dit` via npm by running: Once installed, it can be used on any repository by running: ```bash -dit +gyt ``` ## Available commands -### `dit build` +### `gyt build` Generates a brand from a given schema. ```bash -dit build [flags] +gyt build [flags] ``` #### **Options** @@ -44,21 +44,21 @@ dit build [flags] #### **Example** ```bash -dit build -i schemes/light -o dist/light +gyt build -i schemes/light -o dist/light #=> Build a brand from the schemas localed in `schemes/light` and stores the generated files under `dist/light`. ``` -### `dit validate` +### `gyt validate` Validates generated brand. It requires the `path` to the target folder containing the brand's files. ```bash -dit validate +gyt validate ``` **Example** ```bash -dit validate ./dist/ +gyt validate ./dist/ #=> Validates generated brands stored in `./dist` folder. ``` diff --git a/tokens-cli/build/commands/build.js b/tokens-cli/build/commands/build.js index bcd0314..5e97d53 100644 --- a/tokens-cli/build/commands/build.js +++ b/tokens-cli/build/commands/build.js @@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); exports.handler = exports.builder = exports.desc = exports.command = void 0; const path_1 = __importDefault(require("path")); -const dali_tokens_1 = require("@devoinc/dali-tokens"); +const genesys_tokens_1 = require("@devoinc/genesys-tokens"); exports.command = 'build'; exports.desc = 'Generate brands'; const builder = (yargs) => yargs.options({ @@ -35,10 +35,10 @@ const builder = (yargs) => yargs.options({ }, }); exports.builder = builder; -// dit build -i "schemes/light/*.json" -o dist/light/ +// gyt build -i "schemes/light/*.json" -o dist/light/ const handler = (argv) => { const { scheme, menuScheme, output, input } = argv; - (0, dali_tokens_1.generate)({ + (0, genesys_tokens_1.generate)({ source: input, scheme: scheme, menuScheme: menuScheme, diff --git a/tokens-cli/build/commands/validate.js b/tokens-cli/build/commands/validate.js index 57d6fc1..9916b40 100644 --- a/tokens-cli/build/commands/validate.js +++ b/tokens-cli/build/commands/validate.js @@ -29,13 +29,13 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.handler = exports.builder = exports.desc = exports.command = void 0; const chalk_1 = __importDefault(require("chalk")); const path_1 = __importDefault(require("path")); -const dali_tokens_1 = require("@devoinc/dali-tokens"); +const genesys_tokens_1 = require("@devoinc/genesys-tokens"); exports.command = 'validate [dir]'; exports.desc = 'Validate brand dir'; const validate = async (brandPath) => { const jsonPath = path_1.default.resolve(brandPath, 'json', 'tokens.json.all.json'); const { default: jsonTokens } = await Promise.resolve().then(() => __importStar(require(jsonPath))); - const errors = (0, dali_tokens_1.validateJson)(jsonTokens); + const errors = (0, genesys_tokens_1.validateJson)(jsonTokens); if (errors.length) { console.error(chalk_1.default.red(`❌ Wrong tokens values in "${jsonPath}":\n${errors.join('\n')}`)); process.exit(1); @@ -46,7 +46,7 @@ const validate = async (brandPath) => { }; const builder = (yargs) => yargs.options({}); exports.builder = builder; -// dit validate ./dist/light +// gyt validate ./dist/light const handler = async (argv) => { const { dir } = argv; await validate(dir); diff --git a/tokens-cli/package.json b/tokens-cli/package.json index ce30eb7..c38d327 100644 --- a/tokens-cli/package.json +++ b/tokens-cli/package.json @@ -1,10 +1,10 @@ { - "name": "@devoinc/dali-tokens-cli", + "name": "@devoinc/genesys-tokens-cli", "version": "2.0.1", - "description": "A CLI to generate Dali tokens", + "description": "A CLI to generate Genesys tokens", "main": "src/cli.js", "bin": { - "dit": "build/cli.js" + "gyt": "build/cli.js" }, "scripts": { "lint": "eslint 'src/**/*.ts'", @@ -14,14 +14,14 @@ }, "keywords": [ "cli", - "dali", + "genesys", "design", "tokens" ], "author": "Devo Dev Team", "license": "MIT", "dependencies": { - "@devoinc/dali-tokens": "^2.0.1", + "@devoinc/genesys-tokens": "^2.0.1", "chalk": "^4.1.2", "yargs": "^17.5.1" }, @@ -30,7 +30,7 @@ }, "repository": { "type": "git", - "url": "git@github.com:DevoInc/dali-tokens.git" + "url": "git@github.com:DevoInc/genesys-tokens.git" }, "publishConfig": { "access": "public" diff --git a/tokens-cli/src/commands/build.ts b/tokens-cli/src/commands/build.ts index 51be031..85d6a7c 100644 --- a/tokens-cli/src/commands/build.ts +++ b/tokens-cli/src/commands/build.ts @@ -1,6 +1,6 @@ import path from 'path'; import type { Arguments, CommandBuilder } from 'yargs'; -import { generate, Scheme } from '@devoinc/dali-tokens'; +import { generate, Scheme } from '@devoinc/genesys-tokens'; interface Options { input?: string; @@ -40,7 +40,7 @@ export const builder: CommandBuilder = (yargs) => }, }); -// dit build -i "schemes/light/*.json" -o dist/light/ +// gyt build -i "schemes/light/*.json" -o dist/light/ export const handler = (argv: Arguments): void => { const { scheme, menuScheme, output, input } = argv; diff --git a/tokens-cli/src/commands/validate.ts b/tokens-cli/src/commands/validate.ts index 2d66026..bffecb7 100644 --- a/tokens-cli/src/commands/validate.ts +++ b/tokens-cli/src/commands/validate.ts @@ -1,7 +1,7 @@ import chalk from 'chalk'; import path from 'path'; import type { Arguments, CommandBuilder } from 'yargs'; -import { validateJson } from '@devoinc/dali-tokens'; +import { validateJson } from '@devoinc/genesys-tokens'; export const command = 'validate [dir]'; export const desc = 'Validate brand dir'; @@ -24,7 +24,7 @@ const validate = async (brandPath: string) => { export const builder: CommandBuilder = (yargs) => yargs.options({}); -// dit validate ./dist/light +// gyt validate ./dist/light export const handler = async (argv: Arguments) => { const { dir } = argv; diff --git a/tokens/README.md b/tokens/README.md index 6ded3e5..36cf7ac 100644 --- a/tokens/README.md +++ b/tokens/README.md @@ -1,9 +1,9 @@ -# Dali tokens +# Genesys tokens Tokens' definition and generation tools. This project provides the tools to generate *Devo*'s brand design tokens and its customizations. -It includes the agnostic source for the generation of the tokens, as described in *Dali Design System*. It uses [style-dictionary](https://amzn.github.io/style-dictionary/) under the hood. +It includes the agnostic source for the generation of the tokens, as described in *Genesys Design System*. It uses [style-dictionary](https://amzn.github.io/style-dictionary/) under the hood. ## Tokens generation tools @@ -12,7 +12,7 @@ It includes the agnostic source for the generation of the tokens, as described i Given an input schema, we can generate the corresponding tokens. Tokens are generated in the following formats: `css`, `figma tokens plugin`, `js`, `json` and `scss`. An extra `html` format provides an interactive visualization of the output. ```typescript -import { generate, Scheme } from '@devoinc/dali-tokens'; +import { generate, Scheme } from '@devoinc/genesys-tokens'; generate({ source: './schemes/light', diff --git a/tokens/package.json b/tokens/package.json index 849283a..8a2bdb8 100644 --- a/tokens/package.json +++ b/tokens/package.json @@ -1,5 +1,5 @@ { - "name": "@devoinc/dali-tokens", + "name": "@devoinc/genesys-tokens", "version": "2.0.1", "author": "Devo Dev Team", "license": "MIT", @@ -20,13 +20,13 @@ "dist" ], "keywords": [ - "dali", + "genesys", "design", "tokens" ], "repository": { "type": "git", - "url": "git@github.com:DevoInc/dali-tokens.git" + "url": "git@github.com:DevoInc/genesys-tokens.git" }, "dependencies": { "quicktype-core": "6.0.62",