-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look deeper for package.json? #63
Comments
Oops, this is a fork, so sorry. |
Well, i actually maintain this version of the fork, what is the idea, being able to tell foxy which folders to scan, in the cli, or in the configuration? |
Yeah I'm coming to the conclusion that this is the one to use, thanks for picking it up. How about the dependency itself (Collapsiblock in this case) defines that in |
Aside: what confused me I think is that this documentation still refers to |
Thks, in a while, resolve the confusion in the document, |
If not specified, it will only go through the root directory, specifying the path, it will go through the root directory, and the paths indicated for that package, i think this would solve the problem. |
Sounds good to me :) I suppose there might be an edge case where someone has more than one package file 😱 so if it accepts a string or an array of strings I guess that would cover all bases? Just a string would probably be enough though, not sure I want to encourage that kind of nightmare 🤣 |
related fxpio/foxy#5 Maybe this can work. |
Not really:
If you want to make this the rule then that's ok, this issue was to find out what the options are |
If i understand the problem correctly, we can have in the same package a package.json in root and another in an app directory, for example, or have the package.json in another directory diferent to root, i will review the code. |
I'm happy for there to be only one location for a package.json file in the library, I think that would actually be best after some thought. So if a library sets e.g.
Would mean that the library's package.json file is at |
Here we have a problem with download managers, for example in |
I thought maybe the configuration could be used in \Foxy\Util\AssetUtil::getPath - line 59? |
Yes it works only for dependent packages, but it should work for both cases when the extension is |
Thank you! And for the record, my use-case is only for dependent packages, but I can see how it would be useful for the root package too. |
You can try the draft PR, it should work. Example config: "config": {
"allow-plugins": {
"infection/extension-installer": true,
"composer/installers": true,
"php-forge/foxy": true
},
"foxy": {
"root-package-dir": "theme"
},
"sort-packages": true
}, |
Champion, thank you! I have high hopes this will enable a big change for the Drupal project. |
Not all php libraries keep their JS dependencies at the root of the library, instead opting to have them contained in a subfolder such as
app
ortheme
.This issue is to ask whether or not it would possible and desirable to scan the entire module for a package.json file to add to the root project.
What steps will reproduce the problem?
Create a Drupal project and require foxy:
Require a module with foxy enabled and package.json below the root (theme folder in this case)
What is the expected result?
Collapsiblock should be built as a dependency in the project's root package.json file:
What do you get instead?
Empty dependencies:
Additional info
The text was updated successfully, but these errors were encountered: