Skip to content
This repository has been archived by the owner on Dec 13, 2021. It is now read-only.

Commit

Permalink
add install method to register components more easily
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Jul 2, 2018
1 parent 9960400 commit cb7e069
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,3 @@ export const LINEUP_COMPONENTS = {
LineUpActionsColumnDesc, LineUpCategoricalColumnDesc, LineUpColumnDesc,
LineUpHierarchyColumnDesc, LineUpNumberColumnDesc, LineUpStringColumnDesc,
};

export default LINEUP_COMPONENTS;
12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
import {LINEUP_COMPONENTS} from './components';
export * from './components';

/**
* install module a Vue plugin
* @param Vue
*/
export function install(Vue: {component(id: string, comp: any): void}) {
const root = LINEUP_COMPONENTS as any;
Object.keys(root).forEach((key: string) => {
Vue.component(key, root[key]);
});
}

0 comments on commit cb7e069

Please sign in to comment.