Skip to content

Commit

Permalink
style update
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWangJustToDo committed Aug 22, 2024
1 parent 84576c5 commit c9317dc
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 64 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/components/DiffUnifiedView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const DiffUnifiedView = memo(({ diffFile }: { diffFile: DiffFile }) => {
font: useMemo(() => ({ fontSize: fontSize + "px", fontFamily: "Menlo, Consolas, monospace" }), [fontSize]),
});

const width = Math.max(40, _width + 25);
const width = Math.max(40, _width + 10);

const lines = getUnifiedContentLine(diffFile);

Expand Down
2 changes: 1 addition & 1 deletion packages/vue/src/components/DiffUnifiedView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const DiffUnifiedView = defineComponent(

const width = useTextWidth({ text: maxText, font });

const computedWidth = computed(() => Math.max(40, width.value + 25));
const computedWidth = computed(() => Math.max(40, width.value + 10));

return () => (
<div class="unified-diff-view w-full">
Expand Down
124 changes: 62 additions & 62 deletions scripts/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,68 @@ import tailwindcss from "tailwindcss";
const external = (id: string) => id.includes("node_modules") && !id.includes("tslib") && !id.endsWith(".css");

const start = async () => {
// await rollupWatch({
// packageName: "react",
// packageScope: "packages",
// external: external,
// plugins: {
// multipleDevOther: ({ defaultPlugins, defaultPluginProps: { absolutePath } }) => [
// ...defaultPlugins,
// postcss({
// config: {
// path: absolutePath + "/postcss.config.js",
// ctx: {},
// },
// extract: "css/diff-view.css",
// extensions: [".css"],
// plugins: [
// tailwindcss({
// content: [`${absolutePath}/src/**/*.{js,ts,jsx,tsx}`],
// plugins: [require("tailwind-scrollbar-hide")],
// }),
// ],
// minimize: true,
// }),
// ],
// multipleProdOther: ({ defaultPlugins, defaultPluginProps: { absolutePath } }) => [
// ...defaultPlugins,
// postcss({
// config: {
// path: absolutePath + "/postcss.config.js",
// ctx: {},
// },
// extract: "css/diff-view.css",
// extensions: [".css"],
// plugins: [
// tailwindcss({
// content: [`${absolutePath}/src/**/*.{js,ts,jsx,tsx}`],
// plugins: [require("tailwind-scrollbar-hide")],
// }),
// ],
// minimize: true,
// }),
// ],
// singleOther: ({ defaultPlugins, defaultPluginProps: { absolutePath } }) => [
// ...defaultPlugins,
// postcss({
// config: {
// path: absolutePath + "/postcss.config.js",
// ctx: {},
// },
// extract: "css/diff-view.css",
// extensions: [".css"],
// plugins: [
// tailwindcss({
// content: [`${absolutePath}/src/**/*.{js,ts,jsx,tsx}`],
// plugins: [require("tailwind-scrollbar-hide")],
// }),
// ],
// minimize: true,
// }),
// ],
// },
// });
await rollupWatch({ packageName: "shiki", packageScope: "packages", external: external });
await rollupWatch({
packageName: "react",
packageScope: "packages",
external: external,
plugins: {
multipleDevOther: ({ defaultPlugins, defaultPluginProps: { absolutePath } }) => [
...defaultPlugins,
postcss({
config: {
path: absolutePath + "/postcss.config.js",
ctx: {},
},
extract: "css/diff-view.css",
extensions: [".css"],
plugins: [
tailwindcss({
content: [`${absolutePath}/src/**/*.{js,ts,jsx,tsx}`],
plugins: [require("tailwind-scrollbar-hide")],
}),
],
minimize: true,
}),
],
multipleProdOther: ({ defaultPlugins, defaultPluginProps: { absolutePath } }) => [
...defaultPlugins,
postcss({
config: {
path: absolutePath + "/postcss.config.js",
ctx: {},
},
extract: "css/diff-view.css",
extensions: [".css"],
plugins: [
tailwindcss({
content: [`${absolutePath}/src/**/*.{js,ts,jsx,tsx}`],
plugins: [require("tailwind-scrollbar-hide")],
}),
],
minimize: true,
}),
],
singleOther: ({ defaultPlugins, defaultPluginProps: { absolutePath } }) => [
...defaultPlugins,
postcss({
config: {
path: absolutePath + "/postcss.config.js",
ctx: {},
},
extract: "css/diff-view.css",
extensions: [".css"],
plugins: [
tailwindcss({
content: [`${absolutePath}/src/**/*.{js,ts,jsx,tsx}`],
plugins: [require("tailwind-scrollbar-hide")],
}),
],
minimize: true,
}),
],
},
});
// await rollupWatch({ packageName: "shiki", packageScope: "packages", external: external });
};

start();

0 comments on commit c9317dc

Please sign in to comment.