1- 'use strict' ;
2-
31/* global CloudCmd */
42/* global Util */
53/* global DOM */
64/* global Console */
7- CloudCmd . Konsole = exports ;
8-
9- const exec = require ( 'execon' ) ;
10- const currify = require ( 'currify' ) ;
11- const { tryToCatch} = require ( 'try-to-catch' ) ;
12- const loadJS = require ( 'load.js' ) . js ;
13- const createElement = require ( '@cloudcmd/create-element' ) ;
5+ import exec from 'execon' ;
6+ import currify from 'currify' ;
7+ import { tryToCatch } from 'try-to-catch' ;
8+ import { js as loadJS } from 'load.js' ;
9+ import createElement from '@cloudcmd/create-element' ;
10+ import * as Images from '#dom/images' ;
11+
12+ CloudCmd . Konsole = {
13+ init,
14+ show,
15+ hide,
16+ } ;
1417
15- const Images = require ( '#dom/images' ) ;
1618const { Dialog, CurrentInfo : Info } = DOM ;
1719
1820const rmLastSlash = ( a ) => a . replace ( / \/ $ / , '' ) || '/' ;
@@ -27,7 +29,7 @@ const Name = 'Konsole';
2729let Element ;
2830let Loaded ;
2931
30- module . exports . init = async ( ) => {
32+ export async function init ( ) {
3133 if ( ! config ( 'console' ) )
3234 return ;
3335
@@ -36,13 +38,13 @@ module.exports.init = async () => {
3638 await CloudCmd . View ( ) ;
3739 await load ( ) ;
3840 await create ( ) ;
39- } ;
41+ }
4042
41- module . exports . hide = ( ) => {
43+ export function hide ( ) {
4244 CloudCmd . View . hide ( ) ;
43- } ;
45+ }
4446
45- module . exports . clear = ( ) => {
47+ export const clear = ( ) => {
4648 konsole . clear ( ) ;
4749} ;
4850
@@ -109,7 +111,7 @@ function authCheck(konsole) {
109111 } ) ;
110112}
111113
112- module . exports . show = ( callback ) => {
114+ export function show ( callback ) {
113115 if ( ! Loaded )
114116 return ;
115117
@@ -122,7 +124,7 @@ module.exports.show = (callback) => {
122124 exec ( callback ) ;
123125 } ,
124126 } ) ;
125- } ;
127+ }
126128
127129const load = async ( ) => {
128130 Util . time ( `${ Name } load` ) ;
0 commit comments