Webstorm newbie - is there a way to inherit classes from another project?

Hello everyone,

Is there a way to inherit classes from another project?

What I am trying to accomplish is to create a main project as a base for 4 or 5 sub projects which would inherit classes/methods form the main project?
Is this possible with WebStorm?

example:

Project Main (node.js and selenuim)
(generic classes and methods)
globallibrary.js
logger,js
utilities.js

Project 1

Inherit from project main globallibrary.js, logger.js and utilities.js

Project 2

Inherit from project main globallibrary.js, logger.js and utilities.js


Thanks,
Mike

3 comments
Comment actions Permalink

Hello!

if you are not going to modify the 'Master' project files in subprojects, the most evident way of handling such configuration is adding the main project folder as a global javascript library (Settings/javaScript/Libraries, Add...) and enabling this library for child projects

0
Comment actions Permalink

Thank you Elena,

I have set up the main project directory as a javascript library and enabled this library in project 2.
Reading through the docs, I still do not understand how to access any of the methods in the js files in the library.

Thanks,
Mike

0
Comment actions Permalink

>Reading through the docs, I still do not understand how to access any of the methods in the js files in the library.

just in the same way as if the files are in your project directory - no difference...

0

Please sign in to leave a comment.