Setup library build for first version.

This commit is contained in:
Madeorsk 2024-07-14 22:21:51 +02:00
parent 4c584c805e
commit cf86acfd9b
Signed by: Madeorsk
SSH key fingerprint: SHA256:J9G0ofIOLKf7kyS2IfrMqtMaPdfsk1W02+oGueZzDDU
5 changed files with 114 additions and 61 deletions

4
.gitignore vendored
View file

@ -19,3 +19,7 @@
#!.yarn/cache
node_modules/
.pnp.*
# Library
lib/

View file

@ -1 +1,48 @@
import "./src/styles/main.less";
export * from "./src/Application/Application";
export * from "./src/Application/ApplicationError";
export * from "./src/Application/Kernel";
export * from "./src/Components/Card";
export * from "./src/Components/Buttons/Buttons";
export * from "./src/Components/Curtains/Curtains";
export {useCurtain} from "./src/Components/Curtains/CurtainInstance";
export type {CurtainContextState} from "./src/Components/Curtains/CurtainInstance";
export * from "./src/Components/Dates/Calendar";
export * from "./src/Components/Dates/Datepicker";
export * from "./src/Components/Floating/Float";
export * from "./src/Components/Floating/Tooltip";
export * from "./src/Components/Forms/Checkbox";
export * from "./src/Components/Forms/DatepickerInput";
export * from "./src/Components/Forms/PasswordInput";
export * from "./src/Components/Forms/Radio";
export * from "./src/Components/Forms/RequiredField";
export * from "./src/Components/Forms/TimepickerInput";
export * from "./src/Components/Forms/ToggleSwitch";
export * from "./src/Components/Loaders/GenericLoader";
export * from "./src/Components/Loaders/ListLoader";
export * from "./src/Components/Loaders/SpinningLoader";
export * from "./src/Components/Menus/AppsMenu";
export * from "./src/Components/Menus/MainMenu";
export * from "./src/Components/Menus/MainMenuItem";
export * from "./src/Components/Menus/Submenu";
export * from "./src/Components/Menus/SubmenuFloat";
export * from "./src/Components/Menus/SubmenuItem";
export * from "./src/Components/Modals/Modals";
export * from "./src/Components/Modals/ModalsTypes";
export * from "./src/Components/Notifications/Notification";
export * from "./src/Components/Notifications/Notifications";
export * from "./src/Components/Pagination/Paginate";
export * from "./src/Components/Pagination/Pagination";
export * from "./src/Components/Select/OptionsSuggestions";
export * from "./src/Components/Select/Select";
export * from "./src/Components/Select/SimpleSuggestions";
export * from "./src/Components/Select/Suggestible";
export * from "./src/Components/Steps/Steps";
export * from "./src/Components/Steps/StepsContext";
export * from "./src/Components/Subapps/Subapps";
export * from "./src/Async";
export * from "./src/GlobalState";
export * from "./src/Utils";

View file

@ -1,37 +1,37 @@
{
"name": "kernel-ui-core",
"description": "Kernel UI Core.",
"version": "1.0.0",
"scripts": {
"dev": "vite",
"build": "tsc && vite build"
},
"type": "module",
"source": "index.ts",
"types": "lib/index.d.ts",
"main": "lib/index.js",
"dependencies": {
"@floating-ui/react": "^0.26.17",
"@fontsource-variable/jetbrains-mono": "^5.0.21",
"@fontsource-variable/manrope": "^5.0.20",
"@fontsource-variable/source-serif-4": "^5.0.19",
"@phosphor-icons/react": "^2.1.5",
"react": "^18.3.1",
"react-merge-refs": "^2.1.1",
"react-router-dom": "^6.24.1",
"uuid": "^10.0.0"
},
"devDependencies": {
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10",
"@vitejs/plugin-react": "^4.3.0",
"less": "^4.2.0",
"react-dom": "^18.3.1",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-plugin-dts": "^3.9.1"
},
"packageManager": "yarn@4.2.2"
"version": "1.0.0-rc1",
"name": "@kernelui/core",
"description": "Kernel UI Core.",
"scripts": {
"dev": "vite",
"build": "tsc && vite build"
},
"type": "module",
"source": "index.ts",
"types": "lib/index.d.ts",
"main": "lib/index.js",
"dependencies": {
"@floating-ui/react": "^0.26.17",
"@fontsource-variable/jetbrains-mono": "^5.0.21",
"@fontsource-variable/manrope": "^5.0.20",
"@fontsource-variable/source-serif-4": "^5.0.19",
"@phosphor-icons/react": "^2.1.5",
"react": "^18.3.1",
"react-merge-refs": "^2.1.1",
"react-router-dom": "^6.24.1",
"uuid": "^10.0.0"
},
"devDependencies": {
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10",
"@vitejs/plugin-react": "^4.3.0",
"less": "^4.2.0",
"react-dom": "^18.3.1",
"typescript": "^5.4.5",
"vite": "^5.2.11",
"vite-plugin-dts": "^3.9.1"
},
"packageManager": "yarn@4.2.2"
}

View file

@ -9,6 +9,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
build: {
outDir: "lib",
sourcemap: true,
minify: "esbuild",
lib: {
entry: "index.ts",
formats: ["es"],
@ -23,6 +24,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
react(),
dts({
insertTypesEntry: true,
exclude: ["demo", "node_modules"],
}),
]
});

View file

@ -559,6 +559,32 @@ __metadata:
languageName: node
linkType: hard
"@kernelui/core@workspace:.":
version: 0.0.0-use.local
resolution: "@kernelui/core@workspace:."
dependencies:
"@floating-ui/react": "npm:^0.26.17"
"@fontsource-variable/jetbrains-mono": "npm:^5.0.21"
"@fontsource-variable/manrope": "npm:^5.0.20"
"@fontsource-variable/source-serif-4": "npm:^5.0.19"
"@phosphor-icons/react": "npm:^2.1.5"
"@types/node": "npm:^20.14.10"
"@types/react": "npm:^18.3.3"
"@types/react-dom": "npm:^18.3.0"
"@types/uuid": "npm:^10"
"@vitejs/plugin-react": "npm:^4.3.0"
less: "npm:^4.2.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-merge-refs: "npm:^2.1.1"
react-router-dom: "npm:^6.24.1"
typescript: "npm:^5.4.5"
uuid: "npm:^10.0.0"
vite: "npm:^5.2.11"
vite-plugin-dts: "npm:^3.9.1"
languageName: unknown
linkType: soft
"@microsoft/api-extractor-model@npm:7.28.13":
version: 7.28.13
resolution: "@microsoft/api-extractor-model@npm:7.28.13"
@ -1833,32 +1859,6 @@ __metadata:
languageName: node
linkType: hard
"kernel-ui-core@workspace:.":
version: 0.0.0-use.local
resolution: "kernel-ui-core@workspace:."
dependencies:
"@floating-ui/react": "npm:^0.26.17"
"@fontsource-variable/jetbrains-mono": "npm:^5.0.21"
"@fontsource-variable/manrope": "npm:^5.0.20"
"@fontsource-variable/source-serif-4": "npm:^5.0.19"
"@phosphor-icons/react": "npm:^2.1.5"
"@types/node": "npm:^20.14.10"
"@types/react": "npm:^18.3.3"
"@types/react-dom": "npm:^18.3.0"
"@types/uuid": "npm:^10"
"@vitejs/plugin-react": "npm:^4.3.0"
less: "npm:^4.2.0"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-merge-refs: "npm:^2.1.1"
react-router-dom: "npm:^6.24.1"
typescript: "npm:^5.4.5"
uuid: "npm:^10.0.0"
vite: "npm:^5.2.11"
vite-plugin-dts: "npm:^3.9.1"
languageName: unknown
linkType: soft
"kolorist@npm:^1.8.0":
version: 1.8.0
resolution: "kolorist@npm:1.8.0"