Skip to content

Commit

Permalink
tweaking css to not include blueprint by default or font files
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrich committed Apr 1, 2024
1 parent 84543a8 commit d5d24bf
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/ove/demo/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "../../ove/demo/src";
export * from "./src";
2 changes: 2 additions & 0 deletions packages/ove/demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// eslint-disable-next-line @nx/enforce-module-boundaries
import "../../../ui/src/external_styles";
import React, { useMemo } from "react";
import { Provider } from "react-redux";

Expand Down
2 changes: 1 addition & 1 deletion packages/ove/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</head>
<body>
<link rel="stylesheet" href="/style.css" />
<div id="app"><div id="demo"></div></div>
<div id="demo"></div>
</body>
</html>
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/ove/vite.config.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default defineConfig({
// Change this to the formats you want to support.
// Don't forget to update your package.json as well.
},
copyPublicDir: false,
// copyPublicDir: false,
rollupOptions: {
// External packages that should not be bundled into your library.
external: dependencyKeys,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/demo/src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "../../src/external_styles";
import CollapsibleCard from "./examples/CollapsibleCard";
import MenuBar from "./examples/MenuBar";
import HotkeysDialog from "./examples/HotkeysDialog";
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<script src="./demo/index.js" type="module"></script>
</head>
<body>
<link rel="stylesheet" href="/style.css" />
<div id="app"><div id="demo"></div></div>
<div id="demo"></div>
</body>
</html>
5 changes: 2 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"name": "@teselagen/ui",
"version": "0.3.78",
"version": "0.3.79",
"main": "./src/index.js",
"exports": {
".": {
"import": "./index.es.js",
"require": "./index.cjs.js"
},
"./style.css": "./style.css"
}
}
}
3 changes: 3 additions & 0 deletions packages/ui/src/external_styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import "@blueprintjs/core/lib/css/blueprint.css";
import "@blueprintjs/datetime/lib/css/blueprint-datetime.css";
import "@blueprintjs/icons/lib/css/blueprint-icons.css";
3 changes: 0 additions & 3 deletions packages/ui/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import "@blueprintjs/core/lib/css/blueprint.css";
import "@blueprintjs/datetime/lib/css/blueprint-datetime.css";
import "@blueprintjs/icons/lib/css/blueprint-icons.css";
import "./style.css";
import "./autoTooltip";
export { LoadingDots } from "./FormComponents/LoadingDots";
Expand Down
24 changes: 12 additions & 12 deletions vite.react.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import fs from "node:fs";
import react from "@vitejs/plugin-react";
import viteTsConfigPaths from "vite-tsconfig-paths";
import * as esbuild from "esbuild";
import vitePluginVirtualHtml from "vite-plugin-virtual-html";
// import vitePluginVirtualHtml from "vite-plugin-virtual-html";
import libCss from "vite-plugin-libcss";
import { camelCase } from "lodash";
import { getPort } from "./getPort";
Expand Down Expand Up @@ -88,17 +88,17 @@ export default ({ name }: { name: string; dir: string }) =>
})
]
: [
vitePluginVirtualHtml({
pages: {
index: {
entry: "./demo/index.js", // MUST
title: `${name} demo`, // optional, default: ''
body: `
<div id="demo"></div>
` // optional, default: '<div id="app"></div>'
}
}
})
// vitePluginVirtualHtml({
// pages: {
// index: {
// entry: "./demo/index.js", // MUST
// title: `${name} demo`, // optional, default: ''
// body: `
// <div id="demo"></div>
// ` // optional, default: '<div id="app"></div>'
// }
// }
// })
])
],
esbuild: {
Expand Down

0 comments on commit d5d24bf

Please sign in to comment.