diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c1c606b --- /dev/null +++ b/.gitignore @@ -0,0 +1,23 @@ +# vscode +.vscode + +# Intellij +*.iml +.idea + +# npm +node_modules +pnpm-lock.yaml + +# Don't include the compiled main.js file in the repo. +# They should be uploaded to GitHub releases instead. +main.js + +# Exclude sourcemaps +*.map + +# obsidian +data.json + +# Exclude macOS Finder (System Explorer) View States +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..3ceef6d --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# File Tree Generator \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..3becc9e --- /dev/null +++ b/package.json @@ -0,0 +1,39 @@ +{ + "name": "file-tree-generator", + "displayName": "📁 File Tree Generator", + "version": "1.0.0", + "description": "Generate a file tree using Obsidian callouts!", + "main": "main.js", + "scripts": { + "dev": "tsup-node --watch ./src", + "build": "tsup-node", + "version": "node version-bump.mjs && git add manifest.json versions.json" + }, + "keywords": [ + "file", + "tree", + "file-tree", + "generator", + "file-tree-generator", + "plugin", + "obsidian", + "obsidian-plugin" + ], + "author": "Unarray", + "license": "MIT", + "devDependencies": { + "@bluzzi/eslint-config": "^1.1.0", + "@electron/remote": "^2.0.10", + "@types/node": "^16.11.6", + "eslint": "^8.47.0", + "obsidian": "latest", + "tsconfig-paths": "^4.2.0", + "tsup": "^7.2.0", + "typescript": "4.7.4" + }, + "eslintConfig": { + "extends": [ + "@bluzzi" + ] + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..87234c1 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "commonjs", + + "strict": true, + + "resolveJsonModule": true, + "esModuleInterop": true, + + "baseUrl": ".", + "paths": { + "#/*": ["./src/*"] + } + } +} \ No newline at end of file diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..1e35de6 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "tsup"; + +export default defineConfig((options) => ({ + entry: { + "main": "src/FileTreeGenerator.ts" + }, + minify: !options.watch, + format: "cjs", + outDir: "./" +})); \ No newline at end of file