diff --git a/README.md b/README.md index e12c8fe..bc30194 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # typescript-plugin-namespace-import [](https://www.npmjs.com/package/typescript-plugin-namespace-import) -[](https://github.com/Monchi/typescript-plugin-namespace-import/blob/master/LICENSE) +[](https://github.com/yukukotani/typescript-plugin-namespace-import/blob/master/LICENSE) A [TypeScript Language Service Plugin](https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin) to auto-complete and insert [Namespace Import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#import_an_entire_modules_contents). @@ -9,6 +9,8 @@ A [TypeScript Language Service Plugin](https://github.com/microsoft/TypeScript/w ## Motivation +[日本語の記事 / Japanese Article](https://zenn.dev/yuku/articles/4d2f665cf42385) + We often use an object as a namespace. ```typescript diff --git a/package-lock.json b/package-lock.json index befc2f2..196bd9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "typescript-plugin-namespace-import", - "version": "0.3.2", + "version": "0.3.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 92bd169..9946844 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typescript-plugin-namespace-import", - "version": "0.3.2", + "version": "0.3.3", "description": "A TypeScript Language Service Plugin to auto-complete and insert Namespace Import.", "main": "dist/index.js", "scripts": { @@ -8,14 +8,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/Monchi/typescript-plugin-namespace-import.git" + "url": "git+https://github.com/yukukotani/typescript-plugin-namespace-import.git" }, "author": "Yuku Kotani (yukukotani@gmail.com)", "license": "MIT", "bugs": { - "url": "https://github.com/Monchi/typescript-plugin-namespace-import/issues" + "url": "https://github.com/yukukotani/typescript-plugin-namespace-import/issues" }, - "homepage": "https://github.com/Monchi/typescript-plugin-namespace-import#readme", + "homepage": "https://github.com/yukukotani/typescript-plugin-namespace-import#readme", "dependencies": { "camelcase": "^6.2.0", "tsutils": "^3.21.0", diff --git a/src/lib/import.ts b/src/lib/import.ts index 6a47bec..3ce99ed 100644 --- a/src/lib/import.ts +++ b/src/lib/import.ts @@ -114,9 +114,9 @@ function getModuleSpceifier(selfPath: string, modulePath: string, project: ts.se let specifier: string; if (compilerOptions.baseUrl) { - specifier = path.relative(compilerOptions.baseUrl, modulePath); + specifier = path.posix.relative(compilerOptions.baseUrl, modulePath); } else { - specifier = './' + path.relative(path.dirname(selfPath), modulePath); + specifier = './' + path.posix.relative(path.dirname(selfPath), modulePath); } return getFilePathWithoutExt(specifier);
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: