How to work with a library's source files inside other app

I'm developing a js-library and I have several demo-apps using it.
The library is being developed in its own folder and apps are in their own folders.
I can't merge lib and app files in one folder as I have several apps.

Rough structure of my repo:

/repo
    /Apps/
        /demo1
            /scripts
                /app
                /lib
                /vendor
            /content
                /app
                /lib
                /vendor
    /myLib
        /src
            /scripts
                /lib
                /vendor
            /content
                /lib
                /vendor


To get working apps I copy the content of myLib/src into apps folder - Apps/demo1. I use Grunt for this.
I have to keep two runnning instances of WebStrom to work with the lib and app code (I need to make changes in both of them obviously).
In app's instance I see folders relate to myLib (scripts/lib, content/lib). It's very easy to forget that it's a copy and start making changes. That's bad.
I'd like to have single running WebStorm instance with a demo-app opened in it and to work with lib's original files in it.
Is it possible somehow?

1 comment

Hi there,

A symbolic link to the library folder (instead of copying it) would do the job. This would be a file-system-level solution.

Alternatively -- add such folder(s) as additional Content Root(s) at "Settings | Directories". This would be IDE-level solution.

0

Please sign in to leave a comment.