generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add .prettierrc * npx prettier . --write
- Loading branch information
Showing
11 changed files
with
763 additions
and
758 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.md | ||
main.js | ||
test-longform-vault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"plugins": [], | ||
"printWidth": 80, | ||
"semi": true, | ||
"singleQuote": false, | ||
"tabWidth": 2, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"id": "longform", | ||
"name": "Longform", | ||
"version": "2.0.0", | ||
"minAppVersion": "1.0", | ||
"description": "Write novels, screenplays, and other long projects in Obsidian.", | ||
"author": "Kevin Barrett", | ||
"authorUrl": "https://kevinbarrett.org", | ||
"isDesktopOnly": false | ||
} | ||
{ | ||
"id": "longform", | ||
"name": "Longform", | ||
"version": "2.0.0", | ||
"minAppVersion": "1.0", | ||
"description": "Write novels, screenplays, and other long projects in Obsidian.", | ||
"author": "Kevin Barrett", | ||
"authorUrl": "https://kevinbarrett.org", | ||
"isDesktopOnly": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"id": "longform", | ||
"name": "Longform", | ||
"version": "2.0.7", | ||
"minAppVersion": "1.0", | ||
"description": "Write novels, screenplays, and other long projects in Obsidian.", | ||
"author": "Kevin Barrett", | ||
"authorUrl": "https://kevinbarrett.org", | ||
"fundingUrl": "https://github.com/sponsors/kevboh", | ||
"isDesktopOnly": false | ||
} | ||
{ | ||
"id": "longform", | ||
"name": "Longform", | ||
"version": "2.0.7", | ||
"minAppVersion": "1.0", | ||
"description": "Write novels, screenplays, and other long projects in Obsidian.", | ||
"author": "Kevin Barrett", | ||
"authorUrl": "https://kevinbarrett.org", | ||
"fundingUrl": "https://github.com/sponsors/kevboh", | ||
"isDesktopOnly": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
import svelte from "rollup-plugin-svelte"; | ||
import typescript from "@rollup/plugin-typescript"; | ||
import { nodeResolve } from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import sveltePreprocess from "svelte-preprocess"; | ||
import copy from "rollup-plugin-copy"; | ||
import { env } from "process"; | ||
|
||
const isProd = env.BUILD === "production"; | ||
|
||
const banner = `/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP | ||
if you want to view the source visit the plugins github repository | ||
*/ | ||
`; | ||
|
||
const getPlugins = (...plugins) => | ||
[ | ||
svelte({ | ||
emitCss: false, | ||
preprocess: sveltePreprocess(), | ||
}), | ||
typescript({ | ||
sourceMap: !isProd, | ||
inlineSources: !isProd, | ||
rootDir: "./src", | ||
}), | ||
nodeResolve({ browser: true, dedupe: ["svelte"] }), | ||
commonjs({ | ||
include: "node_modules/**", | ||
}), | ||
].concat(plugins); | ||
|
||
const BASE_CONFIG = { | ||
input: "src/main.ts", | ||
external: ["obsidian"], | ||
}; | ||
|
||
const DEV_PLUGIN_CONFIG = { | ||
...BASE_CONFIG, | ||
output: { | ||
dir: "test-longform-vault/.obsidian/plugins/longform", | ||
sourcemap: "inline", | ||
format: "cjs", | ||
exports: "default", | ||
}, | ||
plugins: getPlugins( | ||
copy({ | ||
targets: [ | ||
{ | ||
src: "manifest.json", | ||
dest: "test-longform-vault/.obsidian/plugins/longform/", | ||
}, | ||
{ | ||
src: "styles.css", | ||
dest: "test-longform-vault/.obsidian/plugins/longform/", | ||
}, | ||
], | ||
hook: "writeBundle", | ||
verbose: true, | ||
overwrite: true, | ||
}) | ||
), | ||
}; | ||
|
||
const PROD_PLUGIN_CONFIG = { | ||
...BASE_CONFIG, | ||
output: { | ||
dir: ".", | ||
sourcemap: !isProd, | ||
format: "cjs", | ||
exports: "default", | ||
banner, | ||
}, | ||
plugins: getPlugins(), | ||
}; | ||
|
||
const config = isProd ? PROD_PLUGIN_CONFIG : DEV_PLUGIN_CONFIG; | ||
|
||
export default config; | ||
import svelte from "rollup-plugin-svelte"; | ||
import typescript from "@rollup/plugin-typescript"; | ||
import { nodeResolve } from "@rollup/plugin-node-resolve"; | ||
import commonjs from "@rollup/plugin-commonjs"; | ||
import sveltePreprocess from "svelte-preprocess"; | ||
import copy from "rollup-plugin-copy"; | ||
import { env } from "process"; | ||
|
||
const isProd = env.BUILD === "production"; | ||
|
||
const banner = `/* | ||
THIS IS A GENERATED/BUNDLED FILE BY ROLLUP | ||
if you want to view the source visit the plugins github repository | ||
*/ | ||
`; | ||
|
||
const getPlugins = (...plugins) => | ||
[ | ||
svelte({ | ||
emitCss: false, | ||
preprocess: sveltePreprocess(), | ||
}), | ||
typescript({ | ||
sourceMap: !isProd, | ||
inlineSources: !isProd, | ||
rootDir: "./src", | ||
}), | ||
nodeResolve({ browser: true, dedupe: ["svelte"] }), | ||
commonjs({ | ||
include: "node_modules/**", | ||
}), | ||
].concat(plugins); | ||
|
||
const BASE_CONFIG = { | ||
input: "src/main.ts", | ||
external: ["obsidian"], | ||
}; | ||
|
||
const DEV_PLUGIN_CONFIG = { | ||
...BASE_CONFIG, | ||
output: { | ||
dir: "test-longform-vault/.obsidian/plugins/longform", | ||
sourcemap: "inline", | ||
format: "cjs", | ||
exports: "default", | ||
}, | ||
plugins: getPlugins( | ||
copy({ | ||
targets: [ | ||
{ | ||
src: "manifest.json", | ||
dest: "test-longform-vault/.obsidian/plugins/longform/", | ||
}, | ||
{ | ||
src: "styles.css", | ||
dest: "test-longform-vault/.obsidian/plugins/longform/", | ||
}, | ||
], | ||
hook: "writeBundle", | ||
verbose: true, | ||
overwrite: true, | ||
}) | ||
), | ||
}; | ||
|
||
const PROD_PLUGIN_CONFIG = { | ||
...BASE_CONFIG, | ||
output: { | ||
dir: ".", | ||
sourcemap: !isProd, | ||
format: "cjs", | ||
exports: "default", | ||
banner, | ||
}, | ||
plugins: getPlugins(), | ||
}; | ||
|
||
const config = isProd ? PROD_PLUGIN_CONFIG : DEV_PLUGIN_CONFIG; | ||
|
||
export default config; |
Oops, something went wrong.