Skip to content

Commit

Permalink
fix: fix broken sources
Browse files Browse the repository at this point in the history
  • Loading branch information
cruperman committed Feb 5, 2021
1 parent fafbe0d commit dd0229e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { basename } from 'path'
import normalize from 'normalize-path'

import { Platforms } from '../core/platforms'

export function getPlatformFromFilePath(filePath: string): Platforms {
const matched = filePath.match(/@([\w|-]+)+\./)
const fileName = basename(filePath)
const matched = fileName.match(/@([\w|-]+)+\./)
return matched === null ? 'common' : (matched[1] as Platforms)
}

Expand Down

0 comments on commit dd0229e

Please sign in to comment.