Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
"description": "Bootstrap theme for Oruga",
"license": "MIT",
"type": "module",
"main": "dist/bootstrap.cjs",
"module": "dist/bootstrap.js",
"unpkg": "dist/bootstrap.cjs",
"main": "dist/theme.umd.cjs",
"module": "dist/theme.js",
"unpkg": "dist/theme.umd.cjs",
"types": "dist/types/theme.d.ts",
"sideEffects": [
"*.css",
"*.scss"
],
"exports": {
".": {
"import": "./dist/theme.js"
},
"./style.css": "./dist/theme.css",
"./style.scss": "./dist/scss/theme.scss"
},
"files": [
"dist"
],
Expand Down Expand Up @@ -62,7 +69,6 @@
"sass": "1.93.2",
"stylelint": "^16.25.0",
"stylelint-config-recommended-scss": "^16.0.2",
"terser": "^5.44.0",
"typescript": "5.9.3",
"vite": "7.1.10",
"vite-plugin-banner": "^0.8.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*************************************
* Oruga Theme Boostrap Full Build
**************************************/
/**********************
* Theme Full Build
***********************/

// import bootstrap functions first (so you can manipulate colors, SVGs, calc, etc)
@import "bootstrap/scss/functions";
Expand All @@ -15,5 +15,5 @@
// import bootstrap styles
@import "bootstrap/scss/bootstrap";

// import oruga theme styles
// import theme styles
@import "./bootstrap";
10 changes: 5 additions & 5 deletions src/assets/scss/bootstrap.scss → src/assets/scss/theme.scss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/**************************
* Oruga Theme Boostrap
***************************/
/******************
* Theme Styles
*******************/

// Globals, utility and functions
// import globals, utilities and functions
@import "utils/animations";
@import "utils/functions";
@import "utils/utility";
@import "utils/root";
@import "utils/base";

// Oruga components
// import theme components
@import "components/autocomplete";
@import "components/breadcrumb";
@import "components/button";
Expand Down
4 changes: 2 additions & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is intended to the be the main entrypoint for the theme's rollup build.
// This file is intended to the be the main entrypoint for the theme's build.

import "./assets/scss/bootstrap-build.scss";
import "./assets/scss/theme-build.scss";
export * from "./plugins/theme.ts";
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "@oruga-ui/examples/dist/examples.css";
import { bootstrapConfig } from "./plugins/theme";

// add theme styles
import "./assets/scss/bootstrap-build.scss";
import "./assets/scss/theme-build.scss";

createApp(App)
.use(router)
Expand Down
9 changes: 2 additions & 7 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,17 @@ export default defineConfig(({ mode }) => {
build: {
emptyOutDir: true,
copyPublicDir: false,
minify: "terser",
lib: {
entry: resolve(__dirname, "src/build.ts"),
name: "OrugaThemeBootstrap",
fileName: "bootstrap",
formats: ["es", "cjs", "umd"],
fileName: "theme",
cssFileName: "theme",
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ["vue", /oruga\/.*/],
output: {
assetFileNames: "bootstrap.[ext]",
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
Expand All @@ -75,14 +73,11 @@ export default defineConfig(({ mode }) => {
},
},
css: {
// rename default `style.css` to `bootstrap.css`
postcss: { to: "bootstrap.css" },
preprocessorOptions: {
includePaths: ["node_modules"],
scss: {
// this can be removed with bootstrap 5.4 (https://github.com/twbs/bootstrap/issues/40962)
silenceDeprecations: [
"mixed-decls",
"color-functions",
"global-builtin",
"import",
Expand Down