Skip to content

Manually building the plugin does not copy dist/* to root #10

@SanskritFritz

Description

@SanskritFritz

I am not very knowleadge in the area of web development and so. But here's what I have tried based on the documentation.

cd .obsidian/plugins
git clone https://github.com/eatcodeplay/obsidian-simple-table-math.git
cd obsidian-simple-table-math
npm install
npm run dev

I expected main.js to appear in the plugin root folder, and I can see the code for that in esbuild.config.mjs:

			const vaultPluginPath = process.env.VAULT_PLUGIN_PATH;
			if (vaultPluginPath) {
				try {
					await Promise.all([
						cp('dist/main.js', `${vaultPluginPath}/main.js`, { overwrite: true }),
						cp('manifest.json', `${vaultPluginPath}/manifest.json`, { overwrite: true }),
						cp('dist/styles.css', `${vaultPluginPath}/styles.css`, { overwrite: true }),
					]);

I issued the command console.log(process.env.VAULT_PLUGIN_PATH); in the debug console in Obsidian, and the result was undefined. I'm not sure if this is correct can you please help me why this happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions