Skip to content

Commit

Permalink
📦 build plugin styles.css with sass, include plugin theme source in dist
Browse files Browse the repository at this point in the history
  • Loading branch information
ebullient committed Mar 19, 2024
1 parent c3f4916 commit a7cb399
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 95 deletions.
20 changes: 11 additions & 9 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ const dir = process.env.OUTDIR ? process.env.OUTDIR : "./build";

const map = {
'src/main.ts': 'main',
'src/scss/styles.scss': 'styles',
'src/scss/layout/slides-extended.scss': 'css/slides-extended',
'plugin/reveal.js-elapsed-time-bar/elapsed-time-bar.js': 'plugin/elapsed-time-bar/elapsed-time-bar',
'src/plugin/reveal.js-elapsed-time-bar/elapsed-time-bar.js': 'plugin/elapsed-time-bar/elapsed-time-bar',
};

const themeDir = 'src/scss/theme/';
Expand Down Expand Up @@ -65,10 +66,10 @@ const parameters = {
'.svg': 'dataurl',
},
format: 'cjs',
// minify: prod,
minify: prod,
target: 'es2020',
logLevel: "info",
// sourcemap: prod ? false : 'inline',
sourcemap: prod ? false : 'inline',
sourcemap: 'inline',
treeShaking: true,
outdir: dir,
Expand All @@ -91,12 +92,6 @@ const parameters = {
to: ['./README.md']
}
}),
copy({
assets: {
from: ['styles.css'],
to: ['./styles.css']
}
}),
copy({
assets: {
from: ['distVersion.json'],
Expand All @@ -115,6 +110,13 @@ const parameters = {
to: ['./dist/'],
}
}),
copy({
assets: {
from: ['node_modules/reveal.js/css/**/*'],
to: ['./dist/css/'],
keepStructure: true
}
}),
copy({
assets: {
from: ['src/scss/theme/source/fonts/**/*'],
Expand Down
31 changes: 31 additions & 0 deletions src/scss/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Styles */

.workspace-split.mod-right-split .workspace-leaf-content[data-type="reveal-preview-view"] {
.view-header {
display: flex;
}
.view-content.reveal-preview-view {
position: relative;
height: calc(100% - var(--header-height) - 1px);
}
}

.view-content.reveal-preview-view {
padding: 0;
overflow: hidden;
}

div.reveal-preview-view {
aspect-ratio: 16/9;
padding: 0;
overflow: hidden;
}

.view-content.reveal-preview-view>iframe,
div.reveal-preview-view>iframe {
border-style: none;
width: 100%;
height: 100%;
}


52 changes: 0 additions & 52 deletions src/scss/theme/white-contrast.scss

This file was deleted.

34 changes: 0 additions & 34 deletions styles.css

This file was deleted.

0 comments on commit a7cb399

Please sign in to comment.