Skip to content

Commit

Permalink
Svelte Refactor 1 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
chhoumann authored Apr 9, 2021
1 parent 83f2dec commit f07c6ce
Show file tree
Hide file tree
Showing 21 changed files with 1,837 additions and 1,547 deletions.
1,155 changes: 614 additions & 541 deletions main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "notetweet",
"name": "NoteTweet🐦",
"version": "0.3.2",
"version": "0.3.3",
"minAppVersion": "0.9.12",
"description": "This plugin allows you to post tweets directly from Obsidian.",
"author": "Christian B. B. Houmann",
Expand Down
24 changes: 20 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
{
"name": "notetweet",
"version": "0.3.2",
"version": "0.3.3",
"description": "Post tweets from Obsidian",
"main": "src/main.js",
"scripts": {
"dev": "rollup --config rollup.config.js -w",
"build": "rollup --config rollup.config.js"
"build": "svelte-check && rollup --config rollup.config.js",
"format": "prettier --write src/**/*",
"lint": "prettier --check src/**/*"
},
"keywords": [],
"author": "",
"keywords": [
"obsidian",
"twitter",
"plugin"
],
"author": "Christian Bager Bach Houmann",
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@tsconfig/svelte": "1.0.10",
"@types/node": "^14.14.2",
"obsidian": "https://github.com/obsidianmd/obsidian-api/tarball/master",
"prettier": "2.2.1",
"prettier-plugin-svelte": "2.2.0",
"rollup": "^2.32.1",
"rollup-plugin-copy": "3.4.0",
"rollup-plugin-svelte": "7.1.0",
"standard-version": "9.1.1",
"svelte": "3.37.0",
"svelte-check": "1.3.0",
"svelte-preprocess": "4.7.0",
"ts-node": "9.1.1",
"tslib": "^2.0.3",
"typescript": "^4.0.3"
},
Expand Down
44 changes: 25 additions & 19 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import typescript from '@rollup/plugin-typescript';
import {nodeResolve} from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

export default {
input: 'src/main.ts',
output: {
dir: '.',
sourcemap: 'inline',
format: 'cjs',
exports: 'default'
},
external: ['obsidian'],
plugins: [
typescript(),
nodeResolve({browser: true}),
commonjs(),
]
};
import typescript from "@rollup/plugin-typescript";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
import svelte from "rollup-plugin-svelte";
import autoPreprocess from "svelte-preprocess";

const path = ".";
export default {
input: "src/main.ts",
output: {
dir: path,
format: "cjs",
exports: "default",
},
external: ["obsidian"],
plugins: [
svelte({
emitCss: false,
preprocess: autoPreprocess(),
}),
typescript(),
resolve({ browser: true, dedupe: ["svelte"] }),
commonjs({ include: "node_modules/**" }),
],
};
Loading

0 comments on commit f07c6ce

Please sign in to comment.