Skip to content

Commit

Permalink
feat(build): added _yfm-only.scss
Browse files Browse the repository at this point in the history
  • Loading branch information
makhnatkin committed Oct 21, 2024
1 parent 5f324c4 commit 6389c35
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
25 changes: 19 additions & 6 deletions esbuild/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ const common = {
build({
...common,
entryPoints: ['src/scss/base.scss'],
outfile: 'dist/css/yfm-base.css',
outfile: 'dist/css/base.css',
format: 'iife',
plugins,
}),
build({
...common,
entryPoints: ['src/scss/_yfm-only.scss'],
outfile: 'dist/css/_yfm-only.css',
format: 'iife',
plugins,
}),
Expand All @@ -75,8 +82,14 @@ const common = {
});
await build({
...common,
entryPoints: ['dist/css/yfm-base.css'],
outfile: 'dist/css/yfm-base.min.css',
entryPoints: ['dist/css/base.css'],
outfile: 'dist/css/base.min.css',
minify: true,
});
await build({
...common,
entryPoints: ['dist/css/_yfm-only.css'],
outfile: 'dist/css/_yfm-only.min.css',
minify: true,
});
})();
Expand All @@ -91,7 +104,7 @@ const common = {
build({
...common,
entryPoints: ['src/js/base.ts'],
outfile: 'dist/js/yfm-base.js',
outfile: 'dist/js/base.js',
}),
build({
...common,
Expand All @@ -108,8 +121,8 @@ const common = {
});
await build({
...common,
entryPoints: ['dist/js/yfm-base.js'],
outfile: 'dist/js/yfm-base.min.js',
entryPoints: ['dist/js/base.js'],
outfile: 'dist/js/base.min.js',
minify: true,
});
})();
10 changes: 10 additions & 0 deletions src/scss/_yfm-only.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
Note: This file excludes cut and tabs for flexibility,
as they may be handled separately in the future.
Direct usage is not recommended, as the file is subject
to changes without prior notice.
*/

@import 'note';
@import 'file';
@import 'table';
3 changes: 0 additions & 3 deletions src/scss/base.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
@import 'common';
@import 'note';
@import 'anchor';
@import 'highlight';
@import 'code';
@import 'file';
@import 'term';
@import 'table';
@import 'modal';
1 change: 1 addition & 0 deletions src/scss/yfm.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import 'base';
@import 'yfm-only';
@import '@diplodoc/cut-extension/runtime';
@import '@diplodoc/tabs-extension/runtime';

0 comments on commit 6389c35

Please sign in to comment.