Open core-ai-bot opened 3 years ago
Comment by ficristo Thursday Dec 01, 2016 at 19:08 GMT
Why not use requirejs to create some logical mapping between the node_modules and thirdparty folders?
I think@
petetnt has done that in https://github.com/adobe/brackets/issues/12006
If we go on this route we probably need to do something for distribution. (I don't remember exactly but I think we don't copy the node_modules over there)
Comment by zaggino Thursday Dec 01, 2016 at 19:20 GMT
Not sure how to do any logical mapping here, but happy to learn. We could use a separate package.json file inside the src folder for production dependencies. That's how brackets-electron does it and that's how electron authors recommend electron projects to be done.
Comment by ficristo Thursday Dec 01, 2016 at 19:43 GMT
The other idea I had in mind was exactly putting a package.json inside the src folder.
Both cases seems better to me.
For the logical mapping@
petetnt knows more.
Comment by petetnt Thursday Dec 01, 2016 at 19:50 GMT
One can use relative mapping with ../node_modules/...
for the requirejs
config so you can use deps from the root folder: https://github.com/petetnt/brackets/blob/petetnt/poc-thirdparty-with-npm/src/main.js#L68. Not sure if that works in browser though.
Comment by zaggino Monday Dec 12, 2016 at 22:27 GMT
Closing in favor of https://github.com/adobe/brackets/pull/12972
Issue by zaggino Wednesday Nov 23, 2016 at 23:17 GMT Originally opened as https://github.com/adobe/brackets/pull/12940
PR for https://github.com/adobe/brackets/issues/12937
zaggino included the following code: https://github.com/adobe/brackets/pull/12940/commits