mendix / pluggable-widgets-tools

Moved to widget resources:
https://github.com/mendix/widgets-resources/
Apache License 2.0
8 stars 5 forks source link

Use environment variables for pkg.config #39

Closed JelteMX closed 4 years ago

JelteMX commented 4 years ago

I have a request for an enhancement:

Currently I am working on two React widgets that use the @mendix/pluggable-widget-tools for development/building/testing. Works great! Yet, I am working on a Mac and so I develop everything on a Mac, while keeping my Windows projects in my virtual machine. This means I need to setup my widgetPath and projectPath to point to the right folder (see this example). What I do now is make the path point to that folder while developing locally, then revert it when I publish to Github. If I leave my folders per my setup, it would break when doing the automated testing/builds in Travis.

Can we make the pluggable widget tools use Environment variables for this? Ideally, I would love to just create a .env file in my local setup that has these paths in there and it would be picked up by dotenv. If I then make sure this file is ignored in my .gitignore, it will use the standard paths that are set in the package.json when building online.

I'll see if I can create a PR that accomplishes this (limited time), but I would like to have the input from the team first to see if my request makes sense.

diego-antonelli commented 4 years ago

Hi @JelteMX , sorry about my late. Yes I think is really valid and will increase the valuability of this tool. Feel free to open the PR when you can.