diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e1c60b..5394e26 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,4 +31,4 @@ jobs: gh release create "$tag" \ --title="$tag" \ --draft \ - main.js manifest.json styles.css \ No newline at end of file + main.js manifest.json src/styles.css \ No newline at end of file diff --git a/.gitignore b/.gitignore index aae2d26..e9e68e4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,3 @@ data.json # Exclude macOS Finder (System Explorer) View States .DS_Store - -# For env variables -env.mjs diff --git a/README.md b/README.md index 8f56464..29e0523 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To install the plugin manually, you need to download the latest release from the To customize this project for your needs, you can clone it and then install all dependencies with `yarn`. -After the installation, you need to create a `env.mjs` file in the root directory. Fill the file with the following content: +After the installation, you need to edit the `env.mjs` file in the root directory. Fill the file with the following content: ```js export const obsidianExportPath = diff --git a/env.mjs b/env.mjs new file mode 100644 index 0000000..f40bd65 --- /dev/null +++ b/env.mjs @@ -0,0 +1 @@ +export const obsidianExportPath = '/.obsidian/plugins/obsidian-enhanced-symbols-prettifier'; \ No newline at end of file diff --git a/esbuild.config.mjs b/esbuild.config.mjs index dd48f49..e1da41f 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -12,6 +12,16 @@ if you want to view the source, please visit the github repository of this plugi const prod = process.argv[2] === 'production'; +const plugins = prod + ? [] + : [ + copyFilesPlugin({ + './main.js': `${obsidianExportPath}/main.js`, + './manifest.json': `${obsidianExportPath}/manifest.json`, + './src/styles.css': `${obsidianExportPath}/styles.css`, + }), + ]; + esbuild .build({ banner: { @@ -55,12 +65,6 @@ esbuild sourcemap: prod ? false : 'inline', treeShaking: true, outfile: 'main.js', - plugins: [ - copyFilesPlugin({ - './main.js': `${obsidianExportPath}/main.js`, - './manifest.json': `${obsidianExportPath}/manifest.json`, - './src/styles.css': `${obsidianExportPath}/styles.css`, - }), - ], + plugins, }) - .catch(() => process.exit(1)); + .catch(() => process.exitCode = 1); diff --git a/manifest.json b/manifest.json index 3c40a31..45fbac1 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { - "id": "enhanced-symbols-prettifier", + "id": "obsidian-enhanced-symbols-prettifier", "name": "Enhanced Symbols Prettifier", - "version": "1.0", + "version": "1.0.0", "minAppVersion": "0.9.12", "description": "Replace/substitute the symbols with actual symbols you commonly type. It also works for emojis shortcuts, abbreviations, greek letters, math symbols or other snippets/aliases you define", "author": "Noam Schmitt", diff --git a/package.json b/package.json index eeab665..7b9494d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "obsidian-symbols-prettifier", - "version": "1.1.4", - "description": "This plugin enables to prettify common text symbols like arrows.", + "name": "obsidian-enhanced-symbols-prettifier", + "version": "1.0.0", + "description": "Replace/substitute the symbols with actual symbols you commonly type. It also works for emojis shortcuts, abbreviations, greek letters, math symbols or other snippets/aliases you define", "main": "main.js", "scripts": { "dev": "node esbuild.config.mjs", @@ -13,9 +13,9 @@ "keywords": [], "repository": { "type": "git", - "url": "git+https://github.com/FlorianWoelki/obsidian-symbols-prettifier.git" + "url": "git+https://github.com/noam-sc/obsidian-enhanced-symbols-prettifier.git" }, - "author": "Florian Woelki", + "author": "Noam Schmitt", "license": "MIT", "devDependencies": { "@types/node": "^16.11.6",