From 12d44de2b9e3052c2fff46e131eb640104b9854c Mon Sep 17 00:00:00 2001 From: Jamie Brynes Date: Sun, 11 Feb 2024 20:45:04 +0000 Subject: [PATCH] chore: move plugin source into plugin/ directory In order to prepare making a docs folder, lets separate the packages cleanly --- .github/workflows/premerge.yml | 8 ++++---- .github/workflows/release.yml | 10 +++++----- .gitignore | 7 ++++--- .prettierrc => plugin/.prettierrc | 0 package.json => plugin/package.json | 0 {src => plugin/src}/api/domain/dueDate.test.ts | 0 {src => plugin/src}/api/domain/dueDate.ts | 0 {src => plugin/src}/api/domain/label.ts | 0 {src => plugin/src}/api/domain/project.ts | 0 {src => plugin/src}/api/domain/section.ts | 0 {src => plugin/src}/api/domain/task.ts | 0 {src => plugin/src}/api/fetcher.ts | 0 {src => plugin/src}/api/index.ts | 0 .../src}/components/CollapseIndicator.svelte | 0 {src => plugin/src}/components/MarkdownRenderer.svelte | 0 {src => plugin/src}/components/ObsidianIcon.svelte | 0 {src => plugin/src}/contextMenu.ts | 0 {src => plugin/src}/data/index.ts | 0 {src => plugin/src}/data/repository.ts | 0 {src => plugin/src}/data/subscriptions.ts | 0 {src => plugin/src}/data/task.ts | 0 {src => plugin/src}/data/transformations.test.ts | 0 {src => plugin/src}/data/transformations.ts | 0 {src => plugin/src}/index.ts | 0 {src => plugin/src}/log.ts | 0 .../src}/modals/createTask/CalendarPicker.svelte | 0 .../modals/createTask/CreateTaskModalContent.svelte | 0 .../src}/modals/createTask/DateSelector.svelte | 0 .../src}/modals/createTask/LabelSelector.svelte | 0 .../src}/modals/createTask/PriorityPicker.svelte | 0 .../src}/modals/createTask/ProjectSelector.svelte | 0 .../src}/modals/createTask/createTaskModal.ts | 0 {src => plugin/src}/modals/createTask/types.ts | 0 .../modals/enterToken/EnterTokenModalContent.svelte | 0 .../src}/modals/enterToken/enterTokenModal.ts | 0 {src => plugin/src}/query/injector.ts | 0 {src => plugin/src}/query/parser.test.ts | 0 {src => plugin/src}/query/parser.ts | 0 {src => plugin/src}/query/query.ts | 0 {src => plugin/src}/query/replacements.test.ts | 0 {src => plugin/src}/query/replacements.ts | 0 {src => plugin/src}/settings.ts | 0 {src => plugin/src}/token.ts | 0 {src => plugin/src}/ui/DescriptionRenderer.svelte | 0 {src => plugin/src}/ui/ErrorDisplay.svelte | 0 {src => plugin/src}/ui/GroupedTasks.svelte | 0 {src => plugin/src}/ui/NoTaskDisplay.svelte | 0 {src => plugin/src}/ui/QueryErrorDisplay.svelte | 0 {src => plugin/src}/ui/TaskList.svelte | 0 {src => plugin/src}/ui/TaskListRoot.svelte | 0 {src => plugin/src}/ui/TaskRenderer.svelte | 0 {src => plugin/src}/ui/TodoistQuery.svelte | 0 {src => plugin/src}/ui/contexts.ts | 0 {src => plugin/src}/utils.ts | 0 {src => plugin/src}/utils/maybe.ts | 0 styles.css => plugin/styles.css | 0 svelte.config.mjs => plugin/svelte.config.mjs | 0 tsconfig.json => plugin/tsconfig.json | 0 vite.config.mts => plugin/vite.config.mts | 2 +- 59 files changed, 14 insertions(+), 13 deletions(-) rename .prettierrc => plugin/.prettierrc (100%) rename package.json => plugin/package.json (100%) rename {src => plugin/src}/api/domain/dueDate.test.ts (100%) rename {src => plugin/src}/api/domain/dueDate.ts (100%) rename {src => plugin/src}/api/domain/label.ts (100%) rename {src => plugin/src}/api/domain/project.ts (100%) rename {src => plugin/src}/api/domain/section.ts (100%) rename {src => plugin/src}/api/domain/task.ts (100%) rename {src => plugin/src}/api/fetcher.ts (100%) rename {src => plugin/src}/api/index.ts (100%) rename {src => plugin/src}/components/CollapseIndicator.svelte (100%) rename {src => plugin/src}/components/MarkdownRenderer.svelte (100%) rename {src => plugin/src}/components/ObsidianIcon.svelte (100%) rename {src => plugin/src}/contextMenu.ts (100%) rename {src => plugin/src}/data/index.ts (100%) rename {src => plugin/src}/data/repository.ts (100%) rename {src => plugin/src}/data/subscriptions.ts (100%) rename {src => plugin/src}/data/task.ts (100%) rename {src => plugin/src}/data/transformations.test.ts (100%) rename {src => plugin/src}/data/transformations.ts (100%) rename {src => plugin/src}/index.ts (100%) rename {src => plugin/src}/log.ts (100%) rename {src => plugin/src}/modals/createTask/CalendarPicker.svelte (100%) rename {src => plugin/src}/modals/createTask/CreateTaskModalContent.svelte (100%) rename {src => plugin/src}/modals/createTask/DateSelector.svelte (100%) rename {src => plugin/src}/modals/createTask/LabelSelector.svelte (100%) rename {src => plugin/src}/modals/createTask/PriorityPicker.svelte (100%) rename {src => plugin/src}/modals/createTask/ProjectSelector.svelte (100%) rename {src => plugin/src}/modals/createTask/createTaskModal.ts (100%) rename {src => plugin/src}/modals/createTask/types.ts (100%) rename {src => plugin/src}/modals/enterToken/EnterTokenModalContent.svelte (100%) rename {src => plugin/src}/modals/enterToken/enterTokenModal.ts (100%) rename {src => plugin/src}/query/injector.ts (100%) rename {src => plugin/src}/query/parser.test.ts (100%) rename {src => plugin/src}/query/parser.ts (100%) rename {src => plugin/src}/query/query.ts (100%) rename {src => plugin/src}/query/replacements.test.ts (100%) rename {src => plugin/src}/query/replacements.ts (100%) rename {src => plugin/src}/settings.ts (100%) rename {src => plugin/src}/token.ts (100%) rename {src => plugin/src}/ui/DescriptionRenderer.svelte (100%) rename {src => plugin/src}/ui/ErrorDisplay.svelte (100%) rename {src => plugin/src}/ui/GroupedTasks.svelte (100%) rename {src => plugin/src}/ui/NoTaskDisplay.svelte (100%) rename {src => plugin/src}/ui/QueryErrorDisplay.svelte (100%) rename {src => plugin/src}/ui/TaskList.svelte (100%) rename {src => plugin/src}/ui/TaskListRoot.svelte (100%) rename {src => plugin/src}/ui/TaskRenderer.svelte (100%) rename {src => plugin/src}/ui/TodoistQuery.svelte (100%) rename {src => plugin/src}/ui/contexts.ts (100%) rename {src => plugin/src}/utils.ts (100%) rename {src => plugin/src}/utils/maybe.ts (100%) rename styles.css => plugin/styles.css (100%) rename svelte.config.mjs => plugin/svelte.config.mjs (100%) rename tsconfig.json => plugin/tsconfig.json (100%) rename vite.config.mts => plugin/vite.config.mts (96%) diff --git a/.github/workflows/premerge.yml b/.github/workflows/premerge.yml index 721f926..b7e60b3 100644 --- a/.github/workflows/premerge.yml +++ b/.github/workflows/premerge.yml @@ -15,13 +15,13 @@ jobs: uses: DeterminateSystems/magic-nix-cache-action@main - name: Install dependencies - run: nix develop ./nix --impure --command npm install + run: nix develop ./nix --impure --command bash -c "cd plugin && npm install" - name: Check - run: nix develop ./nix --impure --command npm run check + run: nix develop ./nix --impure --command bash -c "cd plugin && npm run check" - name: Build - run: nix develop ./nix --impure --command npm run build + run: nix develop ./nix --impure --command bash -c "cd plugin && npm run build" - name: Test - run: nix develop ./nix --impure --command npm run test + run: nix develop ./nix --impure --command bash -c "cd plugin && npm run test" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 95deb16..d3c6d28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,10 +18,10 @@ jobs: uses: DeterminateSystems/magic-nix-cache-action@main - name: Install dependencies - run: nix develop ./nix --impure --command npm install + run: nix develop ./nix --impure --command bash -c "cd plugin && npm install" - name: Build - run: nix develop ./nix --impure --command npm run build + run: nix develop ./nix --impure --command bash -c "cd plugin && npm run build" - name: Release id: create_release @@ -33,6 +33,6 @@ jobs: name: Obsidian x Todoist - v${{ github.ref }} draft: true files: | - dist/main.js - dist/manifest.json - dist/styles.css + plugin/dist/main.js + plugin/dist/manifest.json + plugin/dist/styles.css diff --git a/.gitignore b/.gitignore index cbc6d88..e5948e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -node_modules/ -dist/ -package-lock.json +# Plugin things +plugin/node_modules/ +plugin/dist/ +plugin/package-lock.json # Nix-related things .direnv/ diff --git a/.prettierrc b/plugin/.prettierrc similarity index 100% rename from .prettierrc rename to plugin/.prettierrc diff --git a/package.json b/plugin/package.json similarity index 100% rename from package.json rename to plugin/package.json diff --git a/src/api/domain/dueDate.test.ts b/plugin/src/api/domain/dueDate.test.ts similarity index 100% rename from src/api/domain/dueDate.test.ts rename to plugin/src/api/domain/dueDate.test.ts diff --git a/src/api/domain/dueDate.ts b/plugin/src/api/domain/dueDate.ts similarity index 100% rename from src/api/domain/dueDate.ts rename to plugin/src/api/domain/dueDate.ts diff --git a/src/api/domain/label.ts b/plugin/src/api/domain/label.ts similarity index 100% rename from src/api/domain/label.ts rename to plugin/src/api/domain/label.ts diff --git a/src/api/domain/project.ts b/plugin/src/api/domain/project.ts similarity index 100% rename from src/api/domain/project.ts rename to plugin/src/api/domain/project.ts diff --git a/src/api/domain/section.ts b/plugin/src/api/domain/section.ts similarity index 100% rename from src/api/domain/section.ts rename to plugin/src/api/domain/section.ts diff --git a/src/api/domain/task.ts b/plugin/src/api/domain/task.ts similarity index 100% rename from src/api/domain/task.ts rename to plugin/src/api/domain/task.ts diff --git a/src/api/fetcher.ts b/plugin/src/api/fetcher.ts similarity index 100% rename from src/api/fetcher.ts rename to plugin/src/api/fetcher.ts diff --git a/src/api/index.ts b/plugin/src/api/index.ts similarity index 100% rename from src/api/index.ts rename to plugin/src/api/index.ts diff --git a/src/components/CollapseIndicator.svelte b/plugin/src/components/CollapseIndicator.svelte similarity index 100% rename from src/components/CollapseIndicator.svelte rename to plugin/src/components/CollapseIndicator.svelte diff --git a/src/components/MarkdownRenderer.svelte b/plugin/src/components/MarkdownRenderer.svelte similarity index 100% rename from src/components/MarkdownRenderer.svelte rename to plugin/src/components/MarkdownRenderer.svelte diff --git a/src/components/ObsidianIcon.svelte b/plugin/src/components/ObsidianIcon.svelte similarity index 100% rename from src/components/ObsidianIcon.svelte rename to plugin/src/components/ObsidianIcon.svelte diff --git a/src/contextMenu.ts b/plugin/src/contextMenu.ts similarity index 100% rename from src/contextMenu.ts rename to plugin/src/contextMenu.ts diff --git a/src/data/index.ts b/plugin/src/data/index.ts similarity index 100% rename from src/data/index.ts rename to plugin/src/data/index.ts diff --git a/src/data/repository.ts b/plugin/src/data/repository.ts similarity index 100% rename from src/data/repository.ts rename to plugin/src/data/repository.ts diff --git a/src/data/subscriptions.ts b/plugin/src/data/subscriptions.ts similarity index 100% rename from src/data/subscriptions.ts rename to plugin/src/data/subscriptions.ts diff --git a/src/data/task.ts b/plugin/src/data/task.ts similarity index 100% rename from src/data/task.ts rename to plugin/src/data/task.ts diff --git a/src/data/transformations.test.ts b/plugin/src/data/transformations.test.ts similarity index 100% rename from src/data/transformations.test.ts rename to plugin/src/data/transformations.test.ts diff --git a/src/data/transformations.ts b/plugin/src/data/transformations.ts similarity index 100% rename from src/data/transformations.ts rename to plugin/src/data/transformations.ts diff --git a/src/index.ts b/plugin/src/index.ts similarity index 100% rename from src/index.ts rename to plugin/src/index.ts diff --git a/src/log.ts b/plugin/src/log.ts similarity index 100% rename from src/log.ts rename to plugin/src/log.ts diff --git a/src/modals/createTask/CalendarPicker.svelte b/plugin/src/modals/createTask/CalendarPicker.svelte similarity index 100% rename from src/modals/createTask/CalendarPicker.svelte rename to plugin/src/modals/createTask/CalendarPicker.svelte diff --git a/src/modals/createTask/CreateTaskModalContent.svelte b/plugin/src/modals/createTask/CreateTaskModalContent.svelte similarity index 100% rename from src/modals/createTask/CreateTaskModalContent.svelte rename to plugin/src/modals/createTask/CreateTaskModalContent.svelte diff --git a/src/modals/createTask/DateSelector.svelte b/plugin/src/modals/createTask/DateSelector.svelte similarity index 100% rename from src/modals/createTask/DateSelector.svelte rename to plugin/src/modals/createTask/DateSelector.svelte diff --git a/src/modals/createTask/LabelSelector.svelte b/plugin/src/modals/createTask/LabelSelector.svelte similarity index 100% rename from src/modals/createTask/LabelSelector.svelte rename to plugin/src/modals/createTask/LabelSelector.svelte diff --git a/src/modals/createTask/PriorityPicker.svelte b/plugin/src/modals/createTask/PriorityPicker.svelte similarity index 100% rename from src/modals/createTask/PriorityPicker.svelte rename to plugin/src/modals/createTask/PriorityPicker.svelte diff --git a/src/modals/createTask/ProjectSelector.svelte b/plugin/src/modals/createTask/ProjectSelector.svelte similarity index 100% rename from src/modals/createTask/ProjectSelector.svelte rename to plugin/src/modals/createTask/ProjectSelector.svelte diff --git a/src/modals/createTask/createTaskModal.ts b/plugin/src/modals/createTask/createTaskModal.ts similarity index 100% rename from src/modals/createTask/createTaskModal.ts rename to plugin/src/modals/createTask/createTaskModal.ts diff --git a/src/modals/createTask/types.ts b/plugin/src/modals/createTask/types.ts similarity index 100% rename from src/modals/createTask/types.ts rename to plugin/src/modals/createTask/types.ts diff --git a/src/modals/enterToken/EnterTokenModalContent.svelte b/plugin/src/modals/enterToken/EnterTokenModalContent.svelte similarity index 100% rename from src/modals/enterToken/EnterTokenModalContent.svelte rename to plugin/src/modals/enterToken/EnterTokenModalContent.svelte diff --git a/src/modals/enterToken/enterTokenModal.ts b/plugin/src/modals/enterToken/enterTokenModal.ts similarity index 100% rename from src/modals/enterToken/enterTokenModal.ts rename to plugin/src/modals/enterToken/enterTokenModal.ts diff --git a/src/query/injector.ts b/plugin/src/query/injector.ts similarity index 100% rename from src/query/injector.ts rename to plugin/src/query/injector.ts diff --git a/src/query/parser.test.ts b/plugin/src/query/parser.test.ts similarity index 100% rename from src/query/parser.test.ts rename to plugin/src/query/parser.test.ts diff --git a/src/query/parser.ts b/plugin/src/query/parser.ts similarity index 100% rename from src/query/parser.ts rename to plugin/src/query/parser.ts diff --git a/src/query/query.ts b/plugin/src/query/query.ts similarity index 100% rename from src/query/query.ts rename to plugin/src/query/query.ts diff --git a/src/query/replacements.test.ts b/plugin/src/query/replacements.test.ts similarity index 100% rename from src/query/replacements.test.ts rename to plugin/src/query/replacements.test.ts diff --git a/src/query/replacements.ts b/plugin/src/query/replacements.ts similarity index 100% rename from src/query/replacements.ts rename to plugin/src/query/replacements.ts diff --git a/src/settings.ts b/plugin/src/settings.ts similarity index 100% rename from src/settings.ts rename to plugin/src/settings.ts diff --git a/src/token.ts b/plugin/src/token.ts similarity index 100% rename from src/token.ts rename to plugin/src/token.ts diff --git a/src/ui/DescriptionRenderer.svelte b/plugin/src/ui/DescriptionRenderer.svelte similarity index 100% rename from src/ui/DescriptionRenderer.svelte rename to plugin/src/ui/DescriptionRenderer.svelte diff --git a/src/ui/ErrorDisplay.svelte b/plugin/src/ui/ErrorDisplay.svelte similarity index 100% rename from src/ui/ErrorDisplay.svelte rename to plugin/src/ui/ErrorDisplay.svelte diff --git a/src/ui/GroupedTasks.svelte b/plugin/src/ui/GroupedTasks.svelte similarity index 100% rename from src/ui/GroupedTasks.svelte rename to plugin/src/ui/GroupedTasks.svelte diff --git a/src/ui/NoTaskDisplay.svelte b/plugin/src/ui/NoTaskDisplay.svelte similarity index 100% rename from src/ui/NoTaskDisplay.svelte rename to plugin/src/ui/NoTaskDisplay.svelte diff --git a/src/ui/QueryErrorDisplay.svelte b/plugin/src/ui/QueryErrorDisplay.svelte similarity index 100% rename from src/ui/QueryErrorDisplay.svelte rename to plugin/src/ui/QueryErrorDisplay.svelte diff --git a/src/ui/TaskList.svelte b/plugin/src/ui/TaskList.svelte similarity index 100% rename from src/ui/TaskList.svelte rename to plugin/src/ui/TaskList.svelte diff --git a/src/ui/TaskListRoot.svelte b/plugin/src/ui/TaskListRoot.svelte similarity index 100% rename from src/ui/TaskListRoot.svelte rename to plugin/src/ui/TaskListRoot.svelte diff --git a/src/ui/TaskRenderer.svelte b/plugin/src/ui/TaskRenderer.svelte similarity index 100% rename from src/ui/TaskRenderer.svelte rename to plugin/src/ui/TaskRenderer.svelte diff --git a/src/ui/TodoistQuery.svelte b/plugin/src/ui/TodoistQuery.svelte similarity index 100% rename from src/ui/TodoistQuery.svelte rename to plugin/src/ui/TodoistQuery.svelte diff --git a/src/ui/contexts.ts b/plugin/src/ui/contexts.ts similarity index 100% rename from src/ui/contexts.ts rename to plugin/src/ui/contexts.ts diff --git a/src/utils.ts b/plugin/src/utils.ts similarity index 100% rename from src/utils.ts rename to plugin/src/utils.ts diff --git a/src/utils/maybe.ts b/plugin/src/utils/maybe.ts similarity index 100% rename from src/utils/maybe.ts rename to plugin/src/utils/maybe.ts diff --git a/styles.css b/plugin/styles.css similarity index 100% rename from styles.css rename to plugin/styles.css diff --git a/svelte.config.mjs b/plugin/svelte.config.mjs similarity index 100% rename from svelte.config.mjs rename to plugin/svelte.config.mjs diff --git a/tsconfig.json b/plugin/tsconfig.json similarity index 100% rename from tsconfig.json rename to plugin/tsconfig.json diff --git a/vite.config.mts b/plugin/vite.config.mts similarity index 96% rename from vite.config.mts rename to plugin/vite.config.mts index 6dff11a..44b5efb 100644 --- a/vite.config.mts +++ b/plugin/vite.config.mts @@ -15,7 +15,7 @@ export default defineConfig({ dest: "", }, { - src: "manifest.json", + src: "../manifest.json", dest: "", } ]