exports.js 705 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * 模块暴露
  3. */
  4. ( function ( global ) {
  5. define( 'kf.start', function ( require ) {
  6. var KFEditor = require( "editor/editor" );
  7. // 注册组件
  8. KFEditor.registerComponents( "ui", require( "ui/ui" ) );
  9. KFEditor.registerComponents( "parser", require( "parse/parser" ) );
  10. KFEditor.registerComponents( "render", require( "render/render" ) );
  11. KFEditor.registerComponents( "position", require( "position/position" ) );
  12. KFEditor.registerComponents( "syntax", require( "syntax/syntax" ) );
  13. kf.Editor = KFEditor;
  14. } );
  15. // build环境中才含有use
  16. try {
  17. use( 'kf.start' );
  18. } catch ( e ) {
  19. }
  20. } )( this );