Skip to content

Commit

Permalink
feat!: universal rename dali-> genesys
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo Uceda committed Oct 3, 2022
1 parent 4908020 commit f7a4a4d
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions brand-devo/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 8 additions & 8 deletions brand-devo/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@devoinc/dali-brand-devo",
"name": "@devoinc/genesys-brand-devo",
"version": "2.0.1",
"author": "Devo Dev Team",
"license": "MIT",
Expand All @@ -9,29 +9,29 @@
"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",
"devo"
],
"repository": {
"type": "git",
"url": "[email protected]:DevoInc/dali-tokens.git"
"url": "[email protected]:DevoInc/genesys-tokens.git"
},
"dependencies": {
"@devoinc/dali-tokens-cli": "^2.0.1"
"@devoinc/genesys-tokens-cli": "^2.0.1"
},
"publishConfig": {
"access": "public"
Expand Down
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "dali-tokens",
"name": "genesys-tokens",
"version": "2.0.1",
"author": "Devo Dev Team",
"license": "MIT",
Expand Down
22 changes: 11 additions & 11 deletions tokens-cli/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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**
Expand All @@ -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 <path>
gyt validate <path>
```

**Example**

```bash
dit validate ./dist/
gyt validate ./dist/
#=> Validates generated brands stored in `./dist` folder.
```
6 changes: 3 additions & 3 deletions tokens-cli/build/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions tokens-cli/build/commands/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Loading

0 comments on commit f7a4a4d

Please sign in to comment.