Skip to content

build icons command doesn't work for linked package #218

Description

@Joozty

When design package is linked in different project and the build command is triggered config file from design is not loaded. It happens because we use process.cwd() and the path refer to to that project.

/home/user/dashboard$ node ./node_modules/.bin/design build icons # process.cwd() == /home/user/dashboard

Possible solutions:

  1. use __dirname: That points correctly to the design folder but since the packages are linked it may not pick up project config if both packages are on the same level:
/home/user/design <- will pick up only config from here
/home/user/dashboard
  1. Explicitly load design config in build command and keep process.cwd() It may happen that config will be loaded twice therefore we should maybe handle it somehow.

  2. Anything else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions