chore: remove examples/externalPlugins.js and pluginLoader.ts, update imports to .js
Deleted `examples/externalPlugins.js` and `pluginLoader.ts` as they are no longer used. Updated all `.ts` imports to `.js` across the codebase. Added `MemberOf` to `VerbType` and filtered disabled augmentations in `executeAugmentationPipeline`. Updated documentation to reflect new augmentation registration process. Removed deprecated `allowImportingTsExtensions` from `tsconfig.json`.
This commit is contained in:
parent
7d2b695ea0
commit
203b669203
22 changed files with 1063 additions and 541 deletions
58
examples/rollup.config.js
Normal file
58
examples/rollup.config.js
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/**
|
||||
* Example rollup configuration for using the Brainy augmentation registry
|
||||
*
|
||||
* This example shows how to configure rollup to automatically discover and register
|
||||
* augmentations at build time.
|
||||
*/
|
||||
|
||||
import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
import { createAugmentationRegistryRollupPlugin } from '../dist/index.js';
|
||||
|
||||
export default {
|
||||
// Entry point for the application
|
||||
input: 'src/index.js',
|
||||
|
||||
// Output configuration
|
||||
output: {
|
||||
file: 'dist/bundle.js',
|
||||
format: 'esm',
|
||||
sourcemap: true
|
||||
},
|
||||
|
||||
// Plugins
|
||||
plugins: [
|
||||
// Resolve node modules
|
||||
resolve(),
|
||||
|
||||
// Convert CommonJS modules to ES6
|
||||
commonjs(),
|
||||
|
||||
// Process TypeScript files
|
||||
typescript(),
|
||||
|
||||
// Augmentation Registry Plugin
|
||||
// This plugin will automatically discover and register augmentations
|
||||
// from files that match the specified pattern
|
||||
createAugmentationRegistryRollupPlugin({
|
||||
// Pattern to match files containing augmentations
|
||||
// This will match any file ending with 'augmentation.js' or 'augmentation.ts'
|
||||
pattern: /augmentation\.(js|ts)$/,
|
||||
|
||||
// Options for the loader
|
||||
options: {
|
||||
// Automatically initialize augmentations after loading
|
||||
autoInitialize: true,
|
||||
|
||||
// Log debug information during loading
|
||||
debug: true
|
||||
}
|
||||
})
|
||||
],
|
||||
|
||||
// External dependencies that should not be bundled
|
||||
external: [
|
||||
'brainy'
|
||||
]
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue