mirror of
https://github.com/pjeby/pane-relief.git
synced 2026-07-22 05:20:23 +00:00
Switch build from rollup to ophidian+esbuild
This commit is contained in:
parent
e38e48d8a5
commit
5b045da1b0
11 changed files with 460 additions and 2999 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
|
@ -1 +0,0 @@
|
|||
main.js binary
|
||||
17
.github/workflows/publish.yml
vendored
17
.github/workflows/publish.yml
vendored
|
|
@ -12,10 +12,17 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- uses: pnpm/action-setup@v2.2.2
|
||||
with:
|
||||
version: 6.32.19
|
||||
- name: Create release and Upload
|
||||
id: release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COMMIT_MESSAGE: ${{ github.event.commits[0].message }}
|
||||
run: |
|
||||
PLUGIN_NAME=$(jq -r .id manifest.json)
|
||||
PLUGIN_NAME=${PLUGIN_NAME:-${GITHUB_REPOSITORY##*/}}
|
||||
|
|
@ -28,9 +35,15 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
pnpm install
|
||||
pnpm build
|
||||
rm -f dist/main.css
|
||||
mkdir "${PLUGIN_NAME}"
|
||||
assets=()
|
||||
for f in main.js manifest.json styles.css; do
|
||||
for f in main.js manifest*.json styles.css; do
|
||||
if [[ -f dist/$f ]] && [[ ! -f $f ]]; then
|
||||
mv dist/$f $f;
|
||||
fi
|
||||
if [[ -f $f ]]; then
|
||||
cp $f "${PLUGIN_NAME}/"
|
||||
assets+=(-a "$f")
|
||||
|
|
@ -38,4 +51,4 @@ jobs:
|
|||
done
|
||||
|
||||
zip -r "$PLUGIN_NAME".zip "$PLUGIN_NAME"
|
||||
hub release create "${assets[@]}" -a "$PLUGIN_NAME".zip -m "$TAG_NAME" "$TAG_NAME"
|
||||
hub release create "${assets[@]}" -a "$PLUGIN_NAME".zip -m "$TAG_NAME" -m "### $COMMIT_MESSAGE" "$TAG_NAME"
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
node_modules
|
||||
node_modules
|
||||
dist
|
||||
1006
main.js
1006
main.js
File diff suppressed because one or more lines are too long
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "pane-relief",
|
||||
"name": "Pane Relief",
|
||||
"version": "0.1.13",
|
||||
"version": "0.1.14",
|
||||
"minAppVersion": "0.14.5",
|
||||
"description": "Per-pane history, hotkeys for pane movement + navigation, and more",
|
||||
"author": "PJ Eby",
|
||||
|
|
|
|||
12
ophidian.config.mjs
Normal file
12
ophidian.config.mjs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import Builder from "ophidian/build";
|
||||
import { createRequire } from 'node:module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
const manifest = require("./manifest.json");
|
||||
|
||||
new Builder("src/pane-relief.ts")
|
||||
.withWatch(new URL('', import.meta.url).pathname)
|
||||
.withSass()
|
||||
.withInstall(manifest.id)
|
||||
.build();
|
||||
|
||||
|
|
@ -1,16 +1,14 @@
|
|||
{
|
||||
"name": "pane-relief",
|
||||
"scripts": {
|
||||
"dev": "rollup --config rollup.config.js -w",
|
||||
"build": "rollup --config rollup.config.js"
|
||||
"dev": "node ophidian.config.mjs dev",
|
||||
"build": "node ophidian.config.mjs production"
|
||||
},
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-typescript": "^8",
|
||||
"monkey-around": "^2.3.0",
|
||||
"node-sass": "^5",
|
||||
"obsidian": "0.14.5",
|
||||
"obsidian-rollup-presets": "github:pjeby/obsidian-rollup-presets",
|
||||
"ophidian": "github:pjeby/ophidian",
|
||||
"rollup": "^2.38.1",
|
||||
"tslib": "^2.3.0",
|
||||
"typescript": "4.4.3"
|
||||
|
|
|
|||
2352
pnpm-lock.yaml
2352
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +0,0 @@
|
|||
import builder from "obsidian-rollup-presets";
|
||||
|
||||
export default builder()
|
||||
.apply(c => c.output.sourcemap = "inline")
|
||||
.assign({input: "src/pane-relief.ts"})
|
||||
.withTypeScript()
|
||||
.withInstall(__dirname)
|
||||
.build();
|
||||
25
styles.css
25
styles.css
|
|
@ -1,25 +0,0 @@
|
|||
/* Ensure popovers are above the menu */
|
||||
.menu.pane-relief-history-menu ~ .popover.hover-popover {
|
||||
z-index: var(--layer-menu); }
|
||||
|
||||
/* Give history counts a little breathing room, and match the title text size */
|
||||
.titlebar .history-counter {
|
||||
font-size: 12px;
|
||||
padding-left: 3px;
|
||||
padding-right: 3px; }
|
||||
|
||||
/* Make the button and text more visible when you can go in that direction */
|
||||
.titlebar-button.mod-back.mod-active:not(:hover),
|
||||
.titlebar-button.mod-forward.mod-active:not(:hover) {
|
||||
opacity: 0.75; }
|
||||
|
||||
/* Maximizing */
|
||||
.workspace-split.mod-root.should-maximize .workspace-leaf:not(.is-maximized),
|
||||
.workspace-split.mod-root.should-maximize .workspace-split:not(.has-maximized),
|
||||
body > .popover.hover-popover .workspace-split.should-maximize .workspace-leaf:not(.is-maximized),
|
||||
body > .popover.hover-popover .workspace-split.should-maximize .workspace-split:not(.has-maximized) {
|
||||
display: none; }
|
||||
|
||||
.workspace-split.mod-root.should-maximize .workspace-leaf.is-maximized,
|
||||
body > .popover.hover-popover .workspace-split.should-maximize .workspace-leaf.is-maximized {
|
||||
flex-basis: calc(100% - 4px); }
|
||||
25
tsconfig.json
Normal file
25
tsconfig.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"inlineSourceMap": true,
|
||||
"inlineSources": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "ESNext",
|
||||
"target": "ES2018",
|
||||
"allowJs": true,
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"jsx": "react",
|
||||
"jsxFactory": "el",
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2018",
|
||||
"scripthost"
|
||||
]
|
||||
},
|
||||
"exclude": ["dist"],
|
||||
"include": [
|
||||
"src/*.ts", "src/*.tsx",
|
||||
]
|
||||
}
|
||||
Loading…
Reference in a new issue