Skip to content

Commit e27f566

Browse files
authored
Merge pull request #1190 from pjkaufman/master
Remove JS Styling, Minify CSS, Speed Up Settings Page Loading, Remove Use of `innerHTML`, and Remove Default Hotkey
2 parents ec657ea + 84de78e commit e27f566

30 files changed

+2165
-189
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ main.js
44
translation-helper.js
55
.eslintrc.js
66
babel.config.js
7+
postss.config.js

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ jobs:
2020
with:
2121
node-version: "18.x"
2222

23-
- name: Build plugin
23+
- name: Build plugin and minfy css
2424
run: |
2525
npm ci
2626
npm run build
27+
npm run minify-css
2728
2829
- name: Create Manual Install Zip
2930
run: |
3031
mkdir ${{ env.PLUGIN_NAME }}
31-
cp main.js manifest.json src/styles.css src/utils/default-misspellings.md ${{ env.PLUGIN_NAME }}
32+
cp main.js manifest.json styles.css src/utils/default-misspellings.md ${{ env.PLUGIN_NAME }}
3233
zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }}
3334
3435
- name: Create release
@@ -40,4 +41,4 @@ jobs:
4041
gh release create "$tag" \
4142
--title="$tag" \
4243
--draft \
43-
main.js manifest.json src/styles.css ${{ env.PLUGIN_NAME }}.zip
44+
main.js manifest.json styles.css ${{ env.PLUGIN_NAME }}.zip

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ test-vault/.obsidian/plugins/table-editor-obsidian/*
3131
# occasional bug fix test
3232
main.zip
3333

34+
# ignore generated files
35+
main.js
36+
styles.css
37+
3438
yarn.lock
3539

3640
.DS_Store

esbuild.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ const mockedPlugins = [replace({
2727
// remove the use of obsidian in the options to allow for docs.js to run
2828
'import {Setting} from \'obsidian\';': '',
2929
// remove the use of obsidian in settings helper to allow for docs.js to run
30-
'import {App, Component, MarkdownRenderer} from \'obsidian\';': '',
30+
'import {App, MarkdownRenderer} from \'obsidian\';': '',
3131
// remove the use of obsidian in the auto-correct files picker to allow for docs.js to run
32-
'import {Setting, Component, App, TFile, normalizePath, ExtraButtonComponent} from \'obsidian\';': '',
32+
'import {Setting, App, TFile, normalizePath, ExtraButtonComponent} from \'obsidian\';': '',
3333
// remove the use of obsidian in add custom row to allow for docs.js to run
34-
'import {App, Component, Setting} from \'obsidian\';': '',
34+
'import {App, Setting} from \'obsidian\';': '',
3535
// remove the use of obsidian in suggest to allow for docs.js to run
3636
'import {App, ISuggestOwner, Scope} from \'obsidian\';': '',
3737
// remove the use of obsidian in md file suggester to allow for docs.js to run

0 commit comments

Comments
 (0)