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

RAMP Lib is not being updated #86

Open
james-rae opened this issue Dec 3, 2024 · 1 comment
Open

RAMP Lib is not being updated #86

james-rae opened this issue Dec 3, 2024 · 1 comment
Assignees

Comments

@james-rae
Copy link
Member

Our demo page is using 4.3.0-beta.

This is over a year old, and we had an inquiry where a prospective user had the impression we were still in beta (understandable).

IDEAL SOLUTION: Dr Petrov @milespetrov brews up a marvelous script that auto-updates this site when we mint a new release.

PRACTICAL SOLUTION: We add a step to the release process to update this.

We may also want to look at how this site is being built. If there is a way to leverage the newer chunked builds that Miles is brewing, should be a snappier load and more impressive to visitors.

@milespetrov
Copy link
Member

Easy way

This will only work once ramp4 v4.10.0 is published since the published size of v4.9.0 is over the cdn limit of 150 MB, v4.10.0 will be much slimmer. This method pulls the latest release of ramp4 and uses the newer esDynamic build. Since this always uses the latest release it's possible the demo site breaks if ramp publishes unintended breaking changes. We can always patch this repo if this happens.

Edit public/index.html and replace:

<link rel="stylesheet" href="<%= BASE_URL %>styles/ramp.css" />

with

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ramp-pcar/dist/esDynamic/ramp.css" />

and

<script type="text/javascript" src="<%= BASE_URL %>js/rv-main.js"></script>

with

<script type="module">
    import * as R4 from 'https://cdn.jsdelivr.net/npm/ramp-pcar/dist/esDynamic/ramp.js';
    window.RAMP4 = R4;
</script>

Marvelous script

This way is more complex but it lets us decide when and what version of ramp4 to update to with a github button press.

Update .github/workflows/main.yml to accept manual triggers from the github repo. We can pass it a ramp version we want to use for the demo site. Add ramp-pcar to package.json then have the workflow update the ramp version to the one we picked. See: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

Then in src/components/map.vue you would do a proper import { createApp, version } from 'ramp-pcar'.

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

No branches or pull requests

3 participants