Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Commit

Permalink
release v1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
justjavac committed Apr 19, 2019
1 parent 4f58dd5 commit 2e85780
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
8 changes: 4 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "typescript-deno-plugin",
"version": "1.2.3",
"version": "1.2.4",
"description": "Deno language service plugin for TypeScript",
"main": "out/index.js",
"scripts": {
Expand All @@ -19,12 +19,12 @@
"url": "https://github.com/justjavac/typescript-deno-plugin.git"
},
"dependencies": {
"mock-require": "^3.0.3",
"typescript": "^3.4.4"
"mock-require": "^3.0.3"
},
"devDependencies": {
"@types/mock-require": "^2.0.0",
"@types/node": "^11.10.4",
"tslint": "^5.13.1"
"tslint": "^5.13.1",
"typescript": "^3.4.4"
}
}
34 changes: 17 additions & 17 deletions src/index.ts
Expand Up @@ -10,26 +10,26 @@ import { getDenoDir } from "./shared";

let logger: Logger;

// see https://github.com/denoland/deno/blob/2debbdacb935cfe1eb7bb8d1f40a5063b339d90b/js/compiler.ts#L159-L170
const OPTIONS: ts_module.CompilerOptions = {
allowJs: true,
checkJs: true,
esModuleInterop: true,
module: ts_module.ModuleKind.ESNext,
moduleResolution: ts_module.ModuleResolutionKind.NodeJs,
noEmit: true,
outDir: "$deno$",
removeComments: true,
resolveJsonModule: true,
sourceMap: true,
target: ts_module.ScriptTarget.ESNext,
typeRoots: []
};

export = function init({ typescript }: { typescript: typeof ts_module }) {
// Make sure Deno imports the correct version of TS
mockRequire("typescript", typescript);

// see https://github.com/denoland/deno/blob/2debbdacb935cfe1eb7bb8d1f40a5063b339d90b/js/compiler.ts#L159-L170
const OPTIONS: ts_module.CompilerOptions = {
allowJs: true,
checkJs: true,
esModuleInterop: true,
module: typescript.ModuleKind.ESNext,
moduleResolution: typescript.ModuleResolutionKind.NodeJs,
noEmit: true,
outDir: "$deno$",
removeComments: true,
resolveJsonModule: true,
sourceMap: true,
target: typescript.ScriptTarget.ESNext,
typeRoots: []
};

return {
create(info: ts_module.server.PluginCreateInfo): ts_module.LanguageService {
logger = Logger.forPlugin(info);
Expand Down Expand Up @@ -92,7 +92,7 @@ export = function init({ typescript }: { typescript: typeof ts_module }) {

onConfigurationChanged(config: any) {
logger.info(`onConfigurationChanged: ${JSON.stringify(config)}`);
},
}
};
};

Expand Down

0 comments on commit 2e85780

Please sign in to comment.