Skip to content

Commit

Permalink
Merge pull request #120 from cruperman/cruperman.issue-119.broken-sou…
Browse files Browse the repository at this point in the history
…rces

fix: fix broken sources
  • Loading branch information
yarastqt authored Feb 5, 2021
2 parents fafbe0d + dd0229e commit dd5955d
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 dd5955d

Please sign in to comment.