From d8d532ed4f8583d333a8f5df9892307bd1ed8650 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 9 Feb 2026 19:14:14 +0100 Subject: [PATCH] :sparkles: Make the colors-to-tokens plugin work on subpath --- plugins/angular.json | 6 +++++- plugins/apps/colors-to-tokens-plugin/package.json | 1 + .../apps/colors-to-tokens-plugin/src/app/app.config.ts | 8 +++++--- plugins/apps/colors-to-tokens-plugin/src/index.html | 1 - .../src/{assets => }/manifest.json | 5 +++-- 5 files changed, 14 insertions(+), 7 deletions(-) rename plugins/apps/colors-to-tokens-plugin/src/{assets => }/manifest.json (70%) diff --git a/plugins/angular.json b/plugins/angular.json index ff29b5b1cf..bacabfb4bf 100644 --- a/plugins/angular.json +++ b/plugins/angular.json @@ -360,7 +360,10 @@ "build": { "builder": "@angular-devkit/build-angular:application", "options": { - "outputPath": "dist/apps/colors-to-tokens-plugin", + "outputPath": { + "base": "dist/apps/colors-to-tokens-plugin", + "browser": "" + }, "index": "apps/colors-to-tokens-plugin/src/index.html", "browser": "apps/colors-to-tokens-plugin/src/main.ts", "polyfills": ["zone.js"], @@ -368,6 +371,7 @@ "assets": [ "apps/colors-to-tokens-plugin/src/_headers", "apps/colors-to-tokens-plugin/src/favicon.ico", + "apps/colors-to-tokens-plugin/src/manifest.json", "apps/colors-to-tokens-plugin/src/assets" ], "styles": [ diff --git a/plugins/apps/colors-to-tokens-plugin/package.json b/plugins/apps/colors-to-tokens-plugin/package.json index 2e1d8273be..bd650baeb5 100644 --- a/plugins/apps/colors-to-tokens-plugin/package.json +++ b/plugins/apps/colors-to-tokens-plugin/package.json @@ -6,6 +6,7 @@ "scripts": { "build": "ng build colors-to-tokens-plugin", "build:dev": "ng build colors-to-tokens-plugin --configuration development", + "watch": "ng build colors-to-tokens-plugin --configuration development --watch", "serve": "ng serve colors-to-tokens-plugin", "lint": "eslint .", "test": "vitest" diff --git a/plugins/apps/colors-to-tokens-plugin/src/app/app.config.ts b/plugins/apps/colors-to-tokens-plugin/src/app/app.config.ts index 1b3e4af314..b61f2e2072 100644 --- a/plugins/apps/colors-to-tokens-plugin/src/app/app.config.ts +++ b/plugins/apps/colors-to-tokens-plugin/src/app/app.config.ts @@ -1,6 +1,8 @@ import { ApplicationConfig } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import { provideRouter, withHashLocation } from '@angular/router'; export const appConfig: ApplicationConfig = { - providers: [provideRouter([])], -}; + providers: [ + provideRouter([], withHashLocation()) + ], +}; \ No newline at end of file diff --git a/plugins/apps/colors-to-tokens-plugin/src/index.html b/plugins/apps/colors-to-tokens-plugin/src/index.html index dfb2c4247d..6fc4aa3614 100644 --- a/plugins/apps/colors-to-tokens-plugin/src/index.html +++ b/plugins/apps/colors-to-tokens-plugin/src/index.html @@ -3,7 +3,6 @@ colors-to-tokens-plugin - diff --git a/plugins/apps/colors-to-tokens-plugin/src/assets/manifest.json b/plugins/apps/colors-to-tokens-plugin/src/manifest.json similarity index 70% rename from plugins/apps/colors-to-tokens-plugin/src/assets/manifest.json rename to plugins/apps/colors-to-tokens-plugin/src/manifest.json index ddce33b54a..ddcde677b9 100644 --- a/plugins/apps/colors-to-tokens-plugin/src/assets/manifest.json +++ b/plugins/apps/colors-to-tokens-plugin/src/manifest.json @@ -1,7 +1,8 @@ { "name": "Colors to Tokens", "description": "Generate a design tokens file from a list of colors", - "code": "/assets/plugin.js", - "icon": "/assets/icon.png", + "version": 2, + "code": "assets/plugin.js", + "icon": "assets/icon.png", "permissions": ["content:read", "library:read", "allow:downloads"] }