Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My build system in a package requires a method of discovering the location of a package dependency (in this case, the open-iconic package). Depending on how I use our package the location of this open-iconic package changes relative to the build script. The details of why this is are not really important but suffice to say that I need a way to locate the package within node_modules.
There is already a handy function which does this called
require.resolve()which is in nodejs but method uses the location of the entry point of a package (specified by the "main" property in package.json) as the path to return. Without "main" being specified in package.jsonrequire.resolve()fails.This PR adds that entry point as the
font/css/open-iconic.cssfile. In reality it doesn't matter if this entry point it the one chosen or not. I just need the entry point to be within the package so feel free to change it to suit your needs.Thanks.