Skip to content

Commit

Permalink
chore: 🔥 Remove init CLI command (digdir#2616)
Browse files Browse the repository at this point in the history
- Removed outdated `init` command in CLI. Replaced by `tokens create`
- Removed unused `create-tokens` package.
  • Loading branch information
mimarz authored Oct 15, 2024
1 parent 69291ad commit db678d4
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 82 deletions.
3 changes: 1 addition & 2 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"storefront",
"@repo/components",
"@designsystemet/storybook",
"figma-plugin",
"@digdir/create-tokens"
"figma-plugin"
]
}
1 change: 0 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"storefront": "0.1.0",
"theme": "0.1.0",
"@digdir/designsystemet": "0.1.0-alpha.19",
"@digdir/create-tokens": "0.1.0-alpha.7",
"@digdir/designsystemet-css": "0.11.0-alpha.9",
"@digdir/designsystemet-react": "1.0.0-rc.13",
"@digdir/designsystemet-theme": "1.0.0-rc.13",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/rotten-zoos-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@digdir/designsystemet": patch
---

Removed `init` command. Use `tokens create` instead.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
"@types/node": "^22.1.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/expect": "^2.0.5",
"chromatic": "^11.11.0",
"copyfiles": "^2.4.1",
"storybook-addon-pseudo-states": "^4.0.2",
"typescript": "^5.5.4",
"typescript-plugin-css-modules": "^5.1.0",
"vite": "^5.3.6",
"vitest": "^2.0.5",
"@vitest/expect": "^2.0.5"
"vitest": "^2.0.5"
},
"engines": {
"node": ">=18.12.0"
Expand Down
10 changes: 0 additions & 10 deletions packages/cli/bin/designsystemet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import { Argument, createCommand, program } from '@commander-js/extra-typings';
import chalk from 'chalk';

import { convertToHex } from '../src/colors/index.js';
import { createTokensPackage } from '../src/init/createTokensPackage.js';
import migrations from '../src/migrations/index.js';
import { buildTokens } from '../src/tokens/build.js';
import { typography } from '../src/tokens/build/formats/css';
import { createTokens } from '../src/tokens/create.js';
import { writeTokens } from '../src/tokens/write.js';

Expand Down Expand Up @@ -105,12 +103,4 @@ program
}
});

program
.command('init')
.description('create an initial token structure for Designsystemet')
.addArgument(new Argument('<targetDir>', 'Target directory for the generated code'))
.action(async (targetDir) => {
await createTokensPackage(targetDir);
});

await program.parseAsync(process.argv);
7 changes: 0 additions & 7 deletions packages/create-tokens/.eslintrc.cjs

This file was deleted.

5 changes: 0 additions & 5 deletions packages/create-tokens/index.js

This file was deleted.

27 changes: 0 additions & 27 deletions packages/create-tokens/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions packages/create-tokens/src/create-tokens.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/create-tokens/tsconfig.json

This file was deleted.

12 changes: 0 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1690,18 +1690,6 @@ __metadata:
languageName: unknown
linkType: soft

"@digdir/create-tokens@workspace:packages/create-tokens":
version: 0.0.0-use.local
resolution: "@digdir/create-tokens@workspace:packages/create-tokens"
dependencies:
"@commander-js/extra-typings": "npm:^12.1.0"
commander: "npm:^12.1.0"
tsx: "npm:^4.16.5"
bin:
create-tokens: index.js
languageName: unknown
linkType: soft

"@digdir/designsystemet-css@workspace:^, @digdir/designsystemet-css@workspace:packages/css":
version: 0.0.0-use.local
resolution: "@digdir/designsystemet-css@workspace:packages/css"
Expand Down

0 comments on commit db678d4

Please sign in to comment.