39 lines
2.2 KiB
JavaScript
Raw Normal View History

2018-07-24 00:27:49 -04:00
import { registerBackend, registerWidget, registerEditorComponent } from 'Lib/registry';
import { GitHubBackend } from 'netlify-cms-backend-github';
import { GitLabBackend } from 'netlify-cms-backend-gitlab';
import { GitGatewayBackend } from 'netlify-cms-backend-git-gateway';
import { TestBackend } from 'netlify-cms-backend-test';
import { BooleanControl } from 'netlify-cms-widget-boolean';
2018-07-24 10:45:12 -04:00
import { DateControl, DatePreview } from 'netlify-cms-widget-date';
import { DateTimeControl, DateTimePreview } from 'netlify-cms-widget-datetime';
2018-07-24 13:57:57 -04:00
import { FileControl, FilePreview } from 'netlify-cms-widget-file';
import { ImageControl, ImagePreview } from 'netlify-cms-widget-image';
import { StringControl, StringPreview } from 'netlify-cms-widget-string';
2018-07-24 00:27:49 -04:00
// import { NumberControl, NumberPreview } from 'netlify-cms-widget-number';
// import { TextControl, TextPreview } from 'netlify-cms-widget-text';
// import { SelectControl, SelectPreview } from 'netlify-cms-widget-select';
// import { MarkdownControl, MarkdownPreview } from 'netlify-cms-widget-markdown';
// import { ListControl, ListPreview } from 'netlify-cms-widget-list';
// import { ObjectControl, ObjectPreview } from 'netlify-cms-widget-object';
// import { RelationControl, RelationPreview } from 'netlify-cms-widget-relation';
import image from 'netlify-cms-editor-component-image';
registerBackend('git-gateway', GitGatewayBackend);
registerBackend('github', GitHubBackend);
registerBackend('gitlab', GitLabBackend);
registerBackend('test-repo', TestBackend);
registerWidget('boolean', BooleanControl);
2018-07-24 10:45:12 -04:00
registerWidget('date', DateControl, DatePreview);
registerWidget('datetime', DateTimeControl, DateTimePreview);
2018-07-24 13:57:57 -04:00
registerWidget('file', FileControl, FilePreview);
registerWidget('image', ImageControl, ImagePreview);
2018-07-24 00:27:49 -04:00
registerWidget('string', StringControl, StringPreview);
// registerWidget('text', TextControl, TextPreview);
// registerWidget('number', NumberControl, NumberPreview);
// registerWidget('list', ListControl, ListPreview);
// registerWidget('markdown', MarkdownControl, MarkdownPreview);
// registerWidget('select', SelectControl, SelectPreview);
// registerWidget('object', ObjectControl, ObjectPreview);
// registerWidget('relation', RelationControl, RelationPreview);
registerEditorComponent(image);