question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@framework should point to framework dir

See original GitHub issue
  1. it’s a little confusing / magical how @framework/api/catalog/products points to bigCommerce and similar
  2. we then look in tsconfig and realize A. I can only use one provider at a time and B. if I want to introduce an API outside of the commercial API I can’t use @framework to refer to the framework dir, so it creates multiple patterns to represent the same thing and it’s confusing

so I’m happy to PR but it would be nice if we just @framework/api/catalog/products -> @framework/bigcommerce/api/catalog/products etc in the code and let the framework annotation refer to the dir

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
leoortizzcommented, May 31, 2021

I think it would work a little better if there’s a way we can clone this repo with only the provider files we need, kinda like the create-next-app --example works, with a option like --provider [name]. Otherwise, we always need to remove what we don’t need.

0reactions
lfadescommented, Jun 3, 2021

One of the core ideas of this repo, and the framework we have for commerce, is that providers work in the same way, the usage of a provider should be 100% compatible with the others. That way the same codebase is compatible with every provider, but this is also not the full story.

All imports actually go to the core commerce provider, not to each provider, what each provider does is exporting the same hook from the core but with a changed type, so basically it’s only required because we pay deep attention to types.

And for the case of the Node.js API it’s quite similar, most of the stuff comes from the core commerce, but the commerce provider provides the “handlers” for data fetching.

In a not that long future we’ll make the core commerce and each provider a package, so that it’s easier to use them outside this codebase (they’re agnostic), but for the time being having them as closely matching as possible is the way to go.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ios - Why does framework bundle path resolve to DerivedData ...
When launching from Xcode, Xcode sets DYLD_FRAMEWORK_PATH and DYLD_LIBRARY_PATH to the build products path such that linkage is resolved to ...
Read more >
Anatomy of Framework Bundles - Apple Developer
Provides conceptual information and guidelines on how to create a framework.
Read more >
Specifying an Assembly's Location - .NET Framework
See how to specify the location of an assembly in .NET by using the codeBase element or the probing element in an XML...
Read more >
C++ Include paths not found for framework packages #2234
The structure inside the SomeLibrary.framework directory has only a directory called "headers" where all the headers are listed. Directory ...
Read more >
What is framework? | Definition from TechTarget
.NET Framework, a managed execution environment for Windows that enables software developers to program an application in one language that can work with ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found