Skip to content

Commit

Permalink
feat: setupTypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jul 19, 2020
1 parent b6a7bc9 commit 39c1df1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CompositeDisposable } from "atom";
import {setupTypeScript} from "./typescript.js";

let subscriptions;

Expand All @@ -11,7 +12,7 @@ export function activate(state) {
subscriptions = new CompositeDisposable();

package_deps().then(() => {
// do package stuff here
setupTypeScript()
});
}

Expand Down
7 changes: 7 additions & 0 deletions src/typescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This configures atom-typescript
export function setupTypeScript() {
// use atom-typescript for javascript
atom.config.set("atom-typescript.allowJS", true)
// activate atom-typescript
atom.commands.dispatch(atom.workspace.getElement(), "typescript:activate")
}

0 comments on commit 39c1df1

Please sign in to comment.