Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Commit

Permalink
feat: Add .kt extension to known entry types
Browse files Browse the repository at this point in the history
  • Loading branch information
vmutafov authored Feb 21, 2020
1 parent 6e145a4 commit 55b56c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,14 @@ exports.getEntryModule = function (appDirectory, platform) {
const entry = getPackageJsonEntry(appDirectory);

const tsEntryPath = path.resolve(appDirectory, `${entry}.ts`);
const ktEntryPath = path.resolve(appDirectory, `${entry}.kt`);
const jsEntryPath = path.resolve(appDirectory, `${entry}.js`);
let entryExists = existsSync(tsEntryPath) || existsSync(jsEntryPath);
let entryExists = existsSync(tsEntryPath) || existsSync(ktEntryPath) || existsSync(jsEntryPath);
if (!entryExists && platform) {
const platformTsEntryPath = path.resolve(appDirectory, `${entry}.${platform}.ts`);
const platformKtEntryPath = path.resolve(appDirectory, `${entry}.${platform}.kt`);
const platformJsEntryPath = path.resolve(appDirectory, `${entry}.${platform}.js`);
entryExists = existsSync(platformTsEntryPath) || existsSync(platformJsEntryPath);
entryExists = existsSync(platformTsEntryPath) || existsSync(platformKtEntryPath) || existsSync(platformJsEntryPath);
}

if (!entryExists) {
Expand Down

0 comments on commit 55b56c8

Please sign in to comment.