-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support for scss files in bower packages #155
Comments
ok far below code works for case where locations of bower stuff are default. .bowerrc and bower.json in root of project. One would have to parse .bowerrc to discover "bower-components" directory if other than the default ./bower_components. We could allow custom bower settings in .deprc for those with alternate bower.json and .bowerrc locations. Maybe a bower_root in .deprc which points to the directory where one finds .bowerrc and bower.json would be enough assuming they are always in the same path (extremely likely). Otherwise just need to look for .bowerrc in root and find the bower_components path there. If it doesn't exist we use default location "bower_components". Anything not default must be passed to main-bower-files. Could even just look for bower.json/.bowerrc as a matter of course without even a bower_root set. A little help Joel outlining how you would attack incorporating this and I will try to do it. I've spent a little time looking at the repo and have some idea how all the pieces work for a sass jump to dependency. Focusing on jumptodependency.py, 'directory' could be one from the array of main-bower-files directories when the initial call with styles_root fails??? How about just modifying sass_lookup to handle an array of directories where when one fails it moves on to the next in the array until all are exhausted. We could prepend the directory from styles_root to this array before passing it???? If there is no bower_root in .deprc then the array can just be empty. BTW I see you have a todo to change this python code into a node module, maybe that should been done as part of this change.
Does this only affect jump to dependecy? or get_dependents as well? FYI whatever we do here could be used repeated for any language (mostly js) as bower has many js packages. //////////////////////////////////////////////////////////
|
Haven't forgotten about this and your other issues. Will try to provide On Wed, Jul 8, 2015 at 1:07 PM, dkebler [email protected] wrote:
|
Thanks for all of the detail here. Outside of the implementation, I'm not sure what this features gives us. Can you provide a sample link to a project where this feature would be useful? Is there a bowered module that is solely a scss file?
Though I'm not understanding the need for this feature, I'd focus on sass first by putting this lookup logic right into https://github.com/mrjoelkemp/node-sass-lookup. The goal with all of these features and my Eventually, there might be a single sublime-dependents-backend repo that has all of the shell scripts that the Sublime plugin executes all under one roof. If the feature proves useful, then it would either get integrated into other lookup modules like https://github.com/mrjoelkemp/node-stylus-lookup or a new abstraction could be used. |
So I am assuming you have never used Bower for 3rd party code managment? In the case of styling and now using Gulp code I put together (Compass did So in general allowing Dependents to accept an array of possible "root" How about if Dependents supported accepting a user defined function that SO ------------------ To your end of moving this logic out of python to js maybe some thought on I see two user supplied pieces.
How about two user defined functions for these.
So for any supported language user would need to register with Dependents
I would like to make Dependents work with my Hugo html So how does this approach sound implementation wise? Maybe you should On Thu, Jul 9, 2015 at 6:20 PM, Joel Kemp [email protected] wrote:
Cheers, Cuidate, TTFN http://www.youtube.com/watch?v=5Gu50vq5ux4 |
FYI node-sasshttps://github.com/sass/node-sass supports an array of path Type: Array Default: [] An array of paths that libsass https://github.com/hcatlin/libsass can On Fri, Jul 10, 2015 at 9:45 AM, David Kebler [email protected] wrote:
Cheers, Cuidate, TTFN http://www.youtube.com/watch?v=5Gu50vq5ux4 |
Supporting multiple roots is high on my list of features to implement. We get frustrated at work when we can't use JumpToDependency for every and any dependency path. I think the key to make this work involves:
|
For vendor (bower) packages the @import is not necessarily full path to the scss partial as the remaining portion is accessed via code like compass. So dependents won't find it because it's not within the "styles_root".
So I think like I am doing with gulp this node package https://github.com/ck86/main-bower-files
can be used to build an array of paths which Dependents can use to find and open and @import with nothing but the filename, just need to walk through this generated array.
kinda like this maybe
so now check against scss_paths whenever Dependents fails after looking in/below "styles_root"
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: