-
Notifications
You must be signed in to change notification settings - Fork 3
Provider Hooks API
Called to get the config file of the project.
Return gupm.json at the root of the project
JSON package config
Allow you to change the config retrieved by getPackageConfig.
- PackageConfig : JSON config
New JSON package config
Initialize a project base folder structure. It is recommanded that your provider (if having a custom bootstrap) also have a way/template for user to continue using a gupm.json in their project (You can use a make.gs hook to make the project "make" two differents lists. See the official NPM provider for how to do that).
Create a gupm.json file
Return the list of the dependencies of the current project.
- PackageConfig : JSON config
Reads config.dependencies from the PackageConfig var and returns PRL.
Array of PRL.
Return a dependency with proper name / version / url.
- Dependency : Dependency as described in the config file of the project (no URL)
- Dependency.provider
- Dependency.name
- Dependency.version
Set URL as the name. You pretty much never want to use the default one.
Structured JSON dependency (with a dependency.url)
Resolve dependency's own dependencies.
- Dependency : Dependency as described in the config file of the project (no URL)
- Dependency.provider
- Dependency.name
- Dependency.version
Read's depedency's gupm.json and returns default deps.
Structured JSON dependency (with a dependency.dependencies containing an array of PRL)
Get the dependency based on previous resolve step.
- Provider
- Name
- Version
- Url
- Path : path of the cached dependency
HTTP GET the URL.
Path
Save Result somwhere after it has been retrieve by previous step.
- Provider
- Name
- Version
- Url
- Path : path of the cached dependency
- Result : blob of previous GET step
Save the files. Will unzip/untar/ungzip based on extension
Path
Opportunity to create in .bin any binary your package's dependencies has.
- Destination (By default will be .bin): where you should create the bins
- Source : the depdency folder where you should try to find binaries
Read gupm.json for a "binaries" field, and symlink those into .bin
Save the list of dependency after a new dependency has been added. It is advised to not save the URL.
- Dependencies
- Provider
- Name
- Version
- Url
Save into gupm.json
Publish the path folder.
- Path
create and publish to a local gupm repo.