mirror of
https://github.com/brianpetro/smart-context-obsidian.git
synced 2026-07-22 11:30:25 +00:00
31 lines
805 B
JavaScript
31 lines
805 B
JavaScript
import esbuild from 'esbuild';
|
|
import path from 'path';
|
|
import { build_plugin } from 'obsidian-smart-env/build/build_plugin.js';
|
|
import { build_smart_env_config } from 'obsidian-smart-env/build/build_env_config.js';
|
|
|
|
const roots = [
|
|
path.resolve(process.cwd(), 'src'),
|
|
];
|
|
|
|
build_plugin({
|
|
esbuild,
|
|
entry_point: 'src/main.js',
|
|
entry_point_from_argv: true,
|
|
env_config_builder: build_smart_env_config,
|
|
env_config_output_dir: process.cwd(),
|
|
env_config_roots: roots,
|
|
external: [
|
|
'@codemirror/state',
|
|
'@codemirror/view',
|
|
'@xenova/transformers',
|
|
'@huggingface/transformers',
|
|
'http',
|
|
'url',
|
|
],
|
|
plugin_id: 'smart-context',
|
|
styles_path: path.join(process.cwd(), 'styles.css'),
|
|
}).catch((err) => {
|
|
console.error('Error in build process:', err);
|
|
process.exit(1);
|
|
});
|
|
|