Fixed redundant ./ in page imports.

This commit is contained in:
Martin Sosic 2020-02-04 15:41:24 +01:00 committed by Martin Šošić
parent fa05eed363
commit c2ac122272
2 changed files with 2 additions and 6 deletions

View File

@ -10,18 +10,14 @@ import {= what =} from "{= from =}"
import * as {= entityLowerName =}State from '{= entityStatePath =}'
import * as {= entityLowerName =}Actions from '{= entityActionsPath =}'
import {= entity.name =} from '{= entityClassPath =}'
{=! Imports of entity create forms =}
{=# entityCreateForms =}
import {= entityForm.name =} from '{= path =}'
{=/ entityCreateForms =}
{=! Imports of entity lists =}
{=# entityLists =}
import {= entityList.name =} from '{= path =}'
{=/ entityLists =}
{=/ entities =}
{=# pageStylePath =}
import '{= pageStylePath =}'
{=/ pageStylePath =}

View File

@ -109,7 +109,7 @@ relPathFromPageToSrc = Path.reversePath pageDirPathInSrc
-- NOTE: Here we return FilePath instead of Path because we need stuff like "./" or "../" in the path,
-- which Path would normalize away.
buildImportPathFromPathInSrc :: Path.Path Path.Rel a -> FilePath
buildImportPathFromPathInSrc pathInSrc = "." FP.</> relPathFromPageToSrc FP.</> (Path.toFilePath pathInSrc)
buildImportPathFromPathInSrc pathInSrc = relPathFromPageToSrc FP.</> (Path.toFilePath pathInSrc)
-- Returns file draft(s) that need to be created (if any) +
-- file path via which to import the style (relative to generated src dir).