You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
functionsetAtomGlobals(){if(atom.project.rootDirectories.length>0)global.coderoad.dir=atom.project.rootDirectories[0].path;else{vart="Create a new Atom project. In Atom: File > Open > any folder";_base_1.store.dispatch(Action.toggleAlert({message:t,action:"tip",duration:6e3})),console.log(t),global.coderoad.dir=!1}}functionfindEditor(){vart=atom.workspace.getActiveTextEditor();returnt?getEditorCount>1e3?voidconsole.log("Failed to find active editor"):(getEditorCount=0,t):(getEditorCount+=1,voidsetTimeout(function(){returnfindEditor()},10))}functiongetEditor(){returnnewPromise(function(t,o){t(findEditor())})}functionopen(t,o){returnatom.workspace.open(t,o),!0}functionset(t){getEditor().then(function(o){o.setText(t),o.insertNewline(),o.moveToBottom(),o.save()})}functioninsert(t,o){o=Object.assign(o,{autoIndent:!0}),getEditor().then(function(e){e.moveToBottom(),e.insertText(t,o),e.insertNewline(),e.moveToBottom(),e.save()})}functioncloseAllPanels(){vart=atom.workspace.getTextEditors();t.forEach(function(t){t.destroy()})}functionquit(){}var_base_1=require("../_base"),Action=require("../actions/actions");exports.setAtomGlobals=setAtomGlobals;vargetEditorCount=0;exports.findEditor=findEditor,exports.getEditor=getEditor,exports.open=open,exports.set=set,exports.insert=insert,exports.closeAllPanels=closeAllPanels,exports.quit=quit;