Skip to content
Permalink
Browse files

Squashed commit of the following:

commit 6bc0cf0c888a637dde8885c81cd53bc609ceb102
Author: Darío Javier Cravero <dario@uxtemple.com>
Date:   Tue Sep 24 09:37:17 2019 +0100

    fix: replace path in relative views

commit fea459c
Author: Darío Javier Cravero <dario@uxtemple.com>
Date:   Mon Sep 23 18:20:34 2019 +0100

    fix: replace the right path

commit 3eccb5b
Author: Darío Javier Cravero <dario@uxtemple.com>
Date:   Mon Sep 23 17:16:38 2019 +0100

    fix: remove drive

commit 8151af6
Author: Darío Javier Cravero <dario@uxtemple.com>
Date:   Mon Sep 23 17:13:01 2019 +0100

    fix: windows path
  • Loading branch information...
dariocravero committed Sep 24, 2019
1 parent e739e89 commit cd21907a7992326cf48332abe088c4c4da4c7526
Showing with 7 additions and 3 deletions.
  1. +6 −2 get-view-relative-to-view.js
  2. +1 −1 parse/index.js
@@ -15,9 +15,13 @@ export default function getViewRelativeToView({
let importViewFile = [...importCandidates][0]
if (importCandidates.size > 1) {
let pathToView = view.file.replace(/\.view$/, '')
let maybeFileViewInside = path.join(pathToView, `${id}.view`)
let maybeFileViewCustomInside = path.join(pathToView, `${id}.js`)

let maybeFileViewInside = path
.join(pathToView, `${id}.view`)
.replace(/\\/g, '/')
let maybeFileViewCustomInside = path
.join(pathToView, `${id}.js`)
.replace(/\\/g, '/')
if (importCandidates.has(maybeFileViewInside)) {
importViewFile = maybeFileViewInside
} else if (importCandidates.has(maybeFileViewCustomInside)) {
@@ -800,7 +800,7 @@ That would mean that SomeView in ${block.name} will be replaced by ${block.name}
view.isStory = true
view.flow = flowProp.value
view.pathToStory = file
.replace(path.join(src, 'Stories'), '')
.replace(path.join(src, 'Stories').replace(/\\/g, '/'), '')
.replace('.view', '')

view.data = getData(view.properties.find(p => p.name === 'data'))

0 comments on commit cd21907

Please sign in to comment.
You can’t perform that action at this time.