Skip to content

Load profiles#23

Merged
wafschneider merged 7 commits intodevelopmentfrom
load-profiles
Jun 26, 2018
Merged

Load profiles#23
wafschneider merged 7 commits intodevelopmentfrom
load-profiles

Conversation

@wafschneider
Copy link
Copy Markdown
Collaborator

With these changes to config-dev.js and bib.dev.js, profiles can be read from the Verso config store.

@wafschneider wafschneider requested a review from kirkhess June 22, 2018 21:59
Copy link
Copy Markdown
Contributor

@kirkhess kirkhess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is package-lock.json?

In the config, I would remove var versoURL, and have these constants:
"url" : "http://mlvlp04.loc.gov:3000",
"profileFilter": " /verso/api/configs?filter[where][configType]=profile&filter[where][name]=/"
then
"profiles":[
url+ profileFilter + "BIBFRAME 2.0 Agents.json"

I don't know how to do this as part of a pull...

@wafschneider
Copy link
Copy Markdown
Collaborator Author

package-lock.json is an npm lock file that locks in dependencies for a reproducible build (https://docs.npmjs.com/files/package-lock.json). A developer ca]n always remove it and rebuild in order to test against newer versions of the dependencies. It's actually probably not strictly necessary for the bfe, except in the case where you are running standalone outside of recto.

To make a change to a PR, you can check out the branch, make your change, commit, and push it back to the branch. The new commit will become a part of the PR.

That said, I don't think what you're suggesting will work, as url and profileFilter (in your example) are properties of the config object, not constants, so you can't refer to them in that way. You could do something like this:

var url = "http://localhost:3000";
var profileFilter = "/verso/api/configs?filter[where][configType]=profile&filter[where][name]=";
var config = {
  "url": url,
  [...]
  "profiles": [
    url + profileFilter + "BIBFRAME 2.0 Admin Metadata",
    [...]
  ]
};

If you think that is clearer, let me know and I will make the change.

@kirkhess
Copy link
Copy Markdown
Contributor

kirkhess commented Jun 25, 2018 via email

@wafschneider wafschneider merged commit 4660d8b into development Jun 26, 2018
@wafschneider wafschneider deleted the load-profiles branch June 26, 2018 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants