Open bendman opened 9 years ago
Files should be written to fit AMD loader syntax (RequireJS?). Plugins could either be loaded just by modifying the dependencies array at the top of fett.js
or an external config file.
fett.js
The main Fett code, this would ideally loop through the plugins. It would also provide access to useful utilities, like to filter out example code.
fett.swatch.js
- Swatch component plugin.
fett.beautify.js
- Code beautification and syntax highlighting.
fett.preview.js
- Code preview in iframes.
fett.autonav.js
- Automatic navigation based on headings.
People should be able to add their own plugins for Fett outside of
Fett.js
. There should be an event structure or a plugin registry (method or config, depending on the order of load desired) to make Fett extensible with new components or features without altering the core.Ideally, eventually people would be able to choose what components or features they want and a build script would output that configuration (css/js) for download. It could also generate a configuration file that devs could upload when updating Fett to keep the same configuration (like Icomoon or CKEditor).