From 679464df0e4e87c4844c7db61ebd94564f801468 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 30 Nov 2022 22:23:33 +0900 Subject: [PATCH] Fix runtime insertion --- package.json | 1 + packages/yoshiki/package.json | 2 +- packages/yoshiki/src/web/registry.ts | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 26336a4..307df62 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "private": true, "scripts": { "build": "yarn workspace yoshiki build", + "watch": "yarn workspace yoshiki watch", "publish": "yarn build && yarn workspace yoshiki npm publish", "next": "yarn workspace next-example dev", "expo": "yarn workspace expo-example dev", diff --git a/packages/yoshiki/package.json b/packages/yoshiki/package.json index a94e82e..0878477 100644 --- a/packages/yoshiki/package.json +++ b/packages/yoshiki/package.json @@ -1,6 +1,6 @@ { "name": "yoshiki", - "version": "0.2.5", + "version": "0.2.6", "author": "Zoe Roux (https://github.com/AnonymusRaccoon)", "license": "MIT", "keywords": [ diff --git a/packages/yoshiki/src/web/registry.ts b/packages/yoshiki/src/web/registry.ts index 2d53956..5864544 100644 --- a/packages/yoshiki/src/web/registry.ts +++ b/packages/yoshiki/src/web/registry.ts @@ -105,7 +105,7 @@ export class StyleRegistry { } const lines = existingStyle.split("\n"); - const comReg = new RegExp("/*(\\d+)*/"); + const comReg = new RegExp("/\\*(\\d+)\\*/"); for (const [i, chunk] of newChunks.entries()) { if (!chunk.length) continue; @@ -127,7 +127,7 @@ export class StyleRegistry { } } - return existingStyle; + return lines.join("\n"); } splitInChunks(classes: string[]): string[][] {