Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Part 1: Update ml5 reference script to use @latest #267

Merged
merged 2 commits into from
Feb 21, 2020

Conversation

bomanimc
Copy link
Member

@bomanimc bomanimc commented Feb 20, 2020

This is the first part of a 3 step process to switch the examples from using a specific library version numbers:

  • 1/3: Update ml5 reference script to use @latest (into development branch)
  • 2/3: Merge changes from development to release
  • 3/3: Replace references to ml5 0.4.3 library version with @latest

This was tested by running NODE_ENV=production npm run update:ml5 and ensuring that the resulting changes show that the index.html files in each examples is switched to @latest.

Screen Shot 2020-02-20 at 2 25 01 PM

If we keep this repo (see discussion), maybe we can think of a better way to coordinate changes to the release and development branch!

Context

Approach:

  • Replace all references to the specific ml5 version on imports in the ml5-examples and ml5-boilerplate library with @latest. Delete scripts for updating version numbers in the files.

Pros:

  • Simplest approach for handling the ml5-example repo and ml5-boilerplate repo while also allowing them to remain separate. Overall, this is probably the least disruptive change to the current workflow.

Cons:

  • May cause some confusion about which version of the library is being used
  • If you make a sketch that specifies @latest and then come back to it a year or so later, it’s possible that there could have been breaking changes to the library that would break the script.

Copy link
Contributor

@joeyklee joeyklee left a comment

Choose a reason for hiding this comment

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

create-examples-index.js:

@bomanimc - I'm wondering if we might want to keep the create-examples-index.js script as that is the script that allows us to generate the website at: https://ml5js.github.io/ml5-examples/public/

We can also remove it for now, but in general the script may be handy later?

update-ml5-reference.js

  • looks good to me!

@bomanimc
Copy link
Member Author

Ahh okay gotcha! I had just figured it may have been accidentally left over since the file is totally commented out. I'll remove the deletion commit from this PR!

@bomanimc bomanimc force-pushed the bomani.latest-ml5-reference branch from ad51843 to 1a18d2f Compare February 20, 2020 23:54
@bomanimc
Copy link
Member Author

@joeyklee Updated to remove the file deletion commit.

@joeyklee
Copy link
Contributor

@bomanimc - Ahhh whoops my mistake. You are totally right. I mistook it for the update-examples-json.js file.

It was correct to delete that file. So sorry about that hiccup. We can remove it as it is not being used. Do you mind removing that file again? Then we can merge the PR as originally made :)

Copy link
Contributor

@joeyklee joeyklee left a comment

Choose a reason for hiding this comment

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

Approved! Thank you for these changes!

@bomanimc bomanimc merged commit a033b0f into development Feb 21, 2020
@joeyklee
Copy link
Contributor

Woohoo! Thanks @bomanimc !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants