Skip to content

Commit

Permalink
Missing stylesheets in build
Browse files Browse the repository at this point in the history
style.scss and style_pdf.scss were not compiled. Unknown why it has been missed.
The sheets are only correctly included if included from Header.
Need to change absolute paths in core scripts.
  • Loading branch information
sjpadgett committed Mar 1, 2024
1 parent 94258ab commit 8347d2d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
27 changes: 25 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ let config = {
style_uni: 'interface/themes/oe-styles/style_*.scss',
style_color: 'interface/themes/colors/*.scss',
directional: 'interface/themes/directional.scss',
misc: 'interface/themes/misc/**/*.scss'
misc: 'interface/themes/misc/**/*.scss',
style_other: 'interface/themes/style*.scss'
}
},
dist: {
Expand Down Expand Up @@ -96,6 +97,28 @@ const autoGeneratedHeader = `
*/
`;

function styles_style_other() {
let isSuccess = true;
return gulp.src(config.src.styles.style_other)
.pipe(sourcemaps.init())
.pipe(sass().on('error', (err) => {
log_error(isSuccess, err);
}))
.pipe(postcss([prefix()]))
.pipe(gap.prependText(autoGeneratedHeader))
.pipe(gulpif(!config.dev, csso()))
.pipe(gulpif(!config.dev, sourcemaps.write()))
.on('error', (err) => {
log_error(isSuccess, err);
})
.pipe(gulp.dest(config.dest.themes))
.on('end', () => {
if (isSuccess) {
console.log(logprefix + "Finished compiling OpenEMR root other styles");
}
});
}

// standard themes css compilation
function styles_style_uni() {
let isSuccess = true;
Expand Down Expand Up @@ -421,7 +444,7 @@ function rtl_style_misc() {
}

// compile themes
const styles = gulp.parallel(styles_style_color, styles_style_color_compact, styles_style_uni, styles_style_uni_compact, styles_style_tabs, styles_style_misc, rtl_style_color, rtl_style_color_compact, rtl_style_uni, rtl_style_uni_compact, rtl_style_tabs, rtl_style_misc);
const styles = gulp.parallel(styles_style_color, styles_style_color_compact, styles_style_uni, styles_style_uni_compact, styles_style_tabs, styles_style_misc, styles_style_other, rtl_style_color, rtl_style_color_compact, rtl_style_uni, rtl_style_uni_compact, rtl_style_tabs, rtl_style_misc);

// Copies (and distills, if possible) assets from node_modules to public/assets
function install(done) {
Expand Down
10 changes: 10 additions & 0 deletions interface/themes/style_pdf.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
$compact-theme: false;
@import "../../public/assets/bootstrap/scss/bootstrap";

$fa-font-path: "../assets/@fortawesome/fontawesome-free/webfonts";
@import "../../public/assets/@fortawesome/fontawesome-free/scss/fontawesome";
@import "../../public/assets/@fortawesome/fontawesome-free/scss/brands";
@import "../../public/assets/@fortawesome/fontawesome-free/scss/regular";
@import "../../public/assets/@fortawesome/fontawesome-free/scss/solid";

@import "default-variables";
@import "core";

a {
Expand Down

0 comments on commit 8347d2d

Please sign in to comment.