diff --git a/.changeset/config.json b/.changeset/config.json index 2b94b33766..0b2b6fdece 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -22,7 +22,6 @@ "storefront", "@repo/components", "@designsystemet/storybook", - "figma-plugin", - "@digdir/create-tokens" + "figma-plugin" ] } diff --git a/.changeset/pre.json b/.changeset/pre.json index 1981d4b915..5f5938e3ea 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -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", diff --git a/.changeset/rotten-zoos-live.md b/.changeset/rotten-zoos-live.md new file mode 100644 index 0000000000..46aa063a17 --- /dev/null +++ b/.changeset/rotten-zoos-live.md @@ -0,0 +1,5 @@ +--- +"@digdir/designsystemet": patch +--- + +Removed `init` command. Use `tokens create` instead. diff --git a/package.json b/package.json index 8b7b8ed236..ca8836103a 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/packages/cli/bin/designsystemet.ts b/packages/cli/bin/designsystemet.ts index 0c53540a65..ebb60f8283 100644 --- a/packages/cli/bin/designsystemet.ts +++ b/packages/cli/bin/designsystemet.ts @@ -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'; @@ -105,12 +103,4 @@ program } }); -program - .command('init') - .description('create an initial token structure for Designsystemet') - .addArgument(new Argument('', 'Target directory for the generated code')) - .action(async (targetDir) => { - await createTokensPackage(targetDir); - }); - await program.parseAsync(process.argv); diff --git a/packages/create-tokens/.eslintrc.cjs b/packages/create-tokens/.eslintrc.cjs deleted file mode 100644 index 17b2c863b7..0000000000 --- a/packages/create-tokens/.eslintrc.cjs +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - root: false, - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - }, -}; diff --git a/packages/create-tokens/index.js b/packages/create-tokens/index.js deleted file mode 100755 index db70185c12..0000000000 --- a/packages/create-tokens/index.js +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -import { require } from 'tsx/cjs/api'; - -require('./src/create-tokens.ts', import.meta.url); diff --git a/packages/create-tokens/package.json b/packages/create-tokens/package.json deleted file mode 100644 index 51d5ce7638..0000000000 --- a/packages/create-tokens/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@digdir/create-tokens", - "version": "0.1.0-alpha.7", - "description": "CLI tool to create an initial token structure for Designsystemet", - "author": "Designsystemet team", - "private": true, - "repository": { - "type": "git", - "url": "git+https://github.com/digdir/designsystemet.git" - }, - "homepage": "https://github.com/digdir/designsystemet/tree/main/packages/create-tokens", - "license": "MIT", - "type": "module", - "publishConfig": { - "access": "public" - }, - "main": "index.js", - "bin": "index.js", - "scripts": { - "start": "node index.js" - }, - "dependencies": { - "@commander-js/extra-typings": "^12.1.0", - "commander": "^12.1.0", - "tsx": "^4.16.5" - } -} diff --git a/packages/create-tokens/src/create-tokens.ts b/packages/create-tokens/src/create-tokens.ts deleted file mode 100644 index 6a846132bd..0000000000 --- a/packages/create-tokens/src/create-tokens.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { program } from '@commander-js/extra-typings'; - -import { makeInitCommand } from '../../cli/src/init'; - -program.name('npm create @digdir/tokens'); -makeInitCommand(program); - -void program.parseAsync(process.argv); diff --git a/packages/create-tokens/tsconfig.json b/packages/create-tokens/tsconfig.json deleted file mode 100644 index 4a72d22da5..0000000000 --- a/packages/create-tokens/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "composite": false - }, - "rootDir": "./src", - "include": ["src"] -} diff --git a/yarn.lock b/yarn.lock index 0535575385..db1fb42f1a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"