👷 Reduce dev dependencies

This commit is contained in:
Erin 2023-05-18 09:17:26 -04:00
parent 7c2f375e7c
commit 62b83490e8
No known key found for this signature in database
36 changed files with 832 additions and 9754 deletions

View file

@ -19,5 +19,5 @@ insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,html,rb,css,xml,scss,json}]
[*.{yml,html,rb,css,xml,scss,json,mjs}]
indent_size = 2

26
.github/prerelease.mjs vendored Normal file
View file

@ -0,0 +1,26 @@
import path from 'node:path';
import { readdirSync, readFile, readFileSync, writeFile } from 'fs';
const packageJson = path.resolve('./package.json');
const distDir = path.resolve('./dist');
try {
const json = JSON.parse(readFileSync(packageJson));
readdirSync(distDir).forEach(file => {
const fullName = path.resolve(distDir, file);
console.log(fullName);
readFile(fullName, 'utf8', function (err, data) {
if (err) {
return console.log(err);
}
data = data.replace(/\$version\$/g, json.version);
writeFile(fullName, data, 'utf8', function (err) {
if (err) return console.log(err);
});
});
});
} catch (err) {
console.error(err);
process.exit(1);
}

7
.gitignore vendored
View file

@ -5,10 +5,9 @@ app*.css
dist
linked
src/fragments/2*
src/fragments/3*
!src/fragments/30*
src/fragments/4*
src/fragments/_5*
src/fragments/_6*
src/dnd5e
allthethings*
campaign*

42
admonitions.json Normal file
View file

@ -0,0 +1,42 @@
[
{
"type": "chat",
"color": "171, 197, 176",
"icon": {
"name": "comment",
"type": "font-awesome"
},
"injectColor": false,
"copy": false
},
{
"type": "excerpt",
"color": "161, 126, 155",
"icon": {
"name": "quote-left",
"type": "font-awesome"
},
"injectColor": false,
"copy": false
},
{
"type": "reference",
"color": "183, 194, 204",
"icon": {
"name": "book",
"type": "font-awesome"
},
"injectColor": false,
"copy": false
},
{
"type": "toc",
"color": "#7d7d7d",
"icon": {
"type": "obsidian",
"name": "lucide-list-ordered"
},
"injectColor": false,
"copy": false
}
]

43
build-dev.mjs Normal file
View file

@ -0,0 +1,43 @@
import path from 'node:path';
import { copyFileSync, existsSync, readFileSync } from 'fs';
import chokidar from 'chokidar';
const devTargets = path.resolve('./.dev-target.json');
const distDir = path.resolve('./dist');
try {
if (!existsSync(devTargets)) {
console.log(`No ${devTargets} file found. Exiting.`);
process.exit(0);
}
const data = JSON.parse(readFileSync(devTargets, 'utf-8'));
// Initialize watcher.
const watcher = chokidar.watch(distDir, {
awaitWriteFinish: {
stabilityThreshold: 2000,
pollInterval: 100
}
}).on('change', (f, stats) => {
const key = path.basename(f);
const targets = data[key];
if (stats) {
console.log(`File ${f} changed size to ${stats.size}`);
}
if (targets === undefined) {
return;
} else if (Array.isArray(targets)) {
targets.forEach((t) => {
console.log(`copy ${key} to\n\t${t}`);
copyFileSync(f, path.resolve(t));
})
} else {
console.log(`copy ${key} to ${targets}`);
copyFileSync(f, path.resolve(targets));
}
});
} catch (err) {
console.error(err);
process.exit(1);
}

10372
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -7,11 +7,14 @@
"license": "MIT",
"homepage": "https://github.com/ebullient",
"scripts": {
"build": "npx gulp css",
"dev": "npx gulp dev",
"version": "auto-changelog -p && npx gulp css && cp -v dist/*.css . && git add -u",
"build": "npx sass --no-source-map --stop-on-error src:dist",
"dev": "npm-run-all --parallel watch:scss watch:css",
"watch:scss": "npx sass --watch --embed-source-map src:dist",
"watch:css": "node build-dev.mjs",
"preversion": "npm run build",
"version": "auto-changelog -p && node .github/prerelease.mjs && cp -v dist/*.css .",
"release-notes": "run() { auto-changelog --stdout --hide-credit --hide-empty-releases --template .github/changelog.hbs -v $1 --starting-version $1 > release-notes.md; }; run",
"test-version": "auto-changelog -p"
"test-version": "auto-changelog -p && node .github/prerelease.mjs"
},
"repository": {
"type": "git",
@ -22,11 +25,8 @@
},
"devDependencies": {
"auto-changelog": "^2.4.0",
"gulp": "^4.0.2",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.1.4",
"gulp-sass": "^5.1.0",
"gulp-watch": "^5.0.1",
"chokidar": "^3.5.3",
"npm-run-all": "^4.1.5",
"sass": "^1.43.2"
},
"auto-changelog": {

View file

@ -1,59 +0,0 @@
@mixin folder-color($folder-name, $rgb-color) {
.nav-folder-title[data-path="#{$folder-name}"] { // Folder title
--nav-item-color: #{$rgb-color};
--nav-item-color-hover: #{$rgb-color};
--nav-item-size: 1.3em;
font-family: var(--ebw-font-tags);
font-variant: small-caps;
text-transform: capitalize;
}
.nav-folder-title[data-path^="#{$folder-name}"],
.nav-file-title[data-path^="#{$folder-name}"] {
color: #{$rgb-color};
}
body:not(.is-grabbing) .nav-file-title[data-path^="#{$folder-name}"]:hover,
.nav-folder-title[data-path^="#{$folder-name}"].is-being-dragged,
.nav-folder-title[data-path^="#{$folder-name}"]:hover,
body:not(.is-grabbing) .nav-folder-title[data-path^="#{$folder-name}"]:hover,
.nav-file-title[data-path^="#{$folder-name}"].is-being-dragged,
.nav-file-title[data-path^="#{$folder-name}"]:hover {
color: #{$rgb-color};
}
.nav-file-title[data-path*="#{$folder-name}"].is-active,
.nav-folder-title[data-path*="#{$folder-name}"].is-active {
color: $rgb-color;
font-style: italic;
}
}
@mixin folder-style($folder-name, $rgb-color, $emoji, $family: "", $variant: small-caps, $line-height: 1.1em, $text-transform: capitalize) {
.nav-folder-title[data-path="#{$folder-name}"] { // Folder title
--nav-item-color: #{$rgb-color};
--nav-item-color-hover: #{$rgb-color};
--nav-item-size: #{$line-height};
font-family: #{$family};
font-variant-caps: #{$variant};
text-transform: #{$text-transform};
> .nav-folder-title-content::before {
content: $emoji;
}
}
.nav-folder-title[data-path^="#{$folder-name}"],
.nav-file-title[data-path^="#{$folder-name}"] {
color: #{$rgb-color};
}
body:not(.is-grabbing) .nav-file-title[data-path^="#{$folder-name}"]:hover,
.nav-folder-title[data-path^="#{$folder-name}"].is-being-dragged,
.nav-folder-title[data-path^="#{$folder-name}"]:hover,
body:not(.is-grabbing) .nav-folder-title[data-path^="#{$folder-name}"]:hover,
.nav-file-title[data-path^="#{$folder-name}"].is-being-dragged,
.nav-file-title[data-path^="#{$folder-name}"]:hover {
color: #{$rgb-color};
}
.nav-file-title[data-path*="#{$folder-name}"].is-active,
.nav-folder-title[data-path*="#{$folder-name}"].is-active {
color: #{$rgb-color};
font-style: italic;
}
}

View file

@ -1,7 +1,5 @@
body {
// https://accessiblepalette.com/?lightness=98.2,93.9,85,76.2,67.4,57.8,48,40.2,31.8,24.9&fe6f5c=0,0&ffd863=0,-10&5C7A63=0,0&3d7e7b=0,10&3376ad=0,0&8E6787=1,15&808080=0,0
// https://accessiblepalette.com/?lightness=98.2%2C93.9%2C87.5%2C82.5%2C74.8%2C66%2C48.4%2C30.6%2C19.4%2C10&fe6f5c=0%2C0&ffd863=0%2C-10&5C7A63=0%2C-3&3d7e7b=0%2C10&3376ad=0%2C0&8e6787=0%2C2&808080=0%2C0
// https://accessiblepalette.com/?lightness=98.2,93.9,87.5,82.5,74.8,66,48.4,30.6,19.4,10&C76E85=0,0&DD5755=0,0&d78e6e=0,-8&E1BA60=0,-10&5c7a62=0,0&3376AD=0,10&8E6787=0,0&808080=0,0&009698=0,-3
// Red
--red-0: #f6d3d3;
--red-1: #f3c2c1;

View file

@ -38,7 +38,6 @@ body {
--link-unresolved-decoration-style: dotted;
--link-unresolved-decoration-color: var(--ebw-link-underline);
}
/** BUG */
.cm-s-obsidian span.cm-quote.cm-em {
color: var(--italic-color);
}
@ -105,8 +104,7 @@ strong a:hover,
background-size: .9em;
}
/* Collapse external links / markdown links in edit mode: CodeMirrorOptions + Legacy editor */
/* CM6 editor */
/* Collapse external links / markdown links in edit mode */
body:not(.ebullientworks-show-edit-mode-links) .markdown-source-view.mod-cm6 {
div.cm-line:not(.cm-active) {
> .cm-string.cm-url:not(.cm-formatting) {

View file

@ -16,13 +16,14 @@ body {
--ebw-callout-tip: 134, 196, 193; // cyan-2
--ebw-callout-question: 89, 174, 170; // cyan-3
--ebw-callout-chat: 61, 126, 123; // cyan-4
--ebw-callout-abstract: 199, 178, 195; // purple-2
--ebw-callout-bug: 180, 152, 175; // purple-3
--ebw-callout-example: 142, 103, 135; // purple-4
--ebw-callout-danger: 211, 141, 160; // pink-3
--ebw-callout-failure: 187, 79, 108; // pink-4
--ebw-callout-danger: 230,133,132; // red-3
--ebw-callout-failure: 211,141,159; // pink-3
--ebw-callout-reference: 183, 183, 183; // gray
--ebw-callout-toc: 235, 235, 235; // gray-light-4
@ -41,7 +42,6 @@ body {
--ebw-callout-tip: 61, 126, 123; // cyan-4
--ebw-callout-danger: 167,92,112; // pink-4
--ebw-callout-failure: 188,83,69; // red-4
}
.rendered-widget,
@ -116,6 +116,9 @@ body {
.callout[data-callout="cite"] {
--callout-color: var(--ebw-callout-quote);
}
.callout[data-callout="chat"] {
--callout-color: var(--ebw-callout-chat);
}
.callout[data-callout="reference"] {
--callout-icon: library;
--callout-color: var(--ebw-callout-reference);