Skip to content
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

Adds exstensible dev server module #2037

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vchendrix
Copy link
Collaborator

Ability to extend metacatui server.js for a custom metacatui theme

  • adds app.js module that is extended by server.js
  • Running npm run dev should produce the same results

Tested against 2.21.0
I tested this against the dataone theme from the [email protected] branch using the following configuration.

MetacatUI.AppConfig = {
    theme: "dataone",
    root: "/",
    baseUrl: "https://search.dataone.org",
    d1CNBaseUrl: "https://cn.dataone.org",
}

Executing npm run dev outputs the following informational lines

% npm run dev                             

> [email protected] dev
> node server.js

Setting /components to /Users/val/workspace/metacatui/src/components
Setting /config to /Users/val/workspace/metacatui/src/config
Setting /css to /Users/val/workspace/metacatui/src/css
Setting /font to /Users/val/workspace/metacatui/src/font
Setting /img to /Users/val/workspace/metacatui/src/img
Setting /js to /Users/val/workspace/metacatui/src/js
Now running at http://localhost:3000

Closes #2036

Ability to extend metacatui server.js for a custom metacatui theme
+ adds app.js module that is extended by server.js
+ Running `npm run dev` should produce the same results

Closes #2036
@vchendrix
Copy link
Collaborator Author

@laurenwalker I have been thinking about the name of ./app.js which may be kind of confusing. Should maybe this be renamed to dev.js or something more appropriate? That way it won't get confused with src/js/app.js.

@vchendrix
Copy link
Collaborator Author

@laurenwalker if there is an appropriate place to document how to use this with custom themes, let me know.

@vchendrix vchendrix added the ESS-DIVE Issues associated with the ESS-DIVE project label Jul 29, 2022
@robyngit robyngit linked an issue Jun 4, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ESS-DIVE Issues associated with the ESS-DIVE project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to extend metacatui server.js for a custom metacatui theme
1 participant