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

BREAKING CHANGE: Clean up files in repo #2963

Merged
merged 19 commits into from
Sep 9, 2023
Merged

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Sep 3, 2023

Marked version: 8.0.0

Description

Clean up files that are not needed in repo. I left marked.min.js since we need it in the repo to run our demo on master and specific commits and prs.

This is only breaking if someone uses the files in lib/ on the master branch. Technically they were never meant to be used so I'm not sure we actually need to bump the major version.

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel
Copy link

vercel bot commented Sep 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2023 6:41am

@UziTech UziTech changed the title Clean up files in repo BREAKING CHANGE: Clean up files in repo Sep 7, 2023
@UziTech UziTech marked this pull request as ready for review September 7, 2023 01:33
@styfle
Copy link
Member

styfle commented Sep 7, 2023

I left marked.min.js since we need it in the repo to run our demo on master and specific commits and prs.

We actually don't need marked.min.js to be committed to git because each PR gets built and deployed to Vercel. So we could build marked.min.js and host it as a static file as part of the deployment (as part of the build:docs script which is what we currently have configured for Vercel).

Copy link
Contributor

@calculuschild calculuschild left a comment

Choose a reason for hiding this comment

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

This looks ok to me. Keeping in mind I'm not as familiar with all of the packaging steps, but this change makes sense to me.

.gitignore Show resolved Hide resolved
@@ -24,6 +25,8 @@ async function init() {
console.log('Cleaning up output directory ' + outputDir);
await rm(outputDir, { force: true, recursive: true });
await mkdir(outputDir);
console.log(`Copying file ${join(cwd, 'LICENSE.md')}`);
console.log(` to ${join(inputDir, 'LICENSE.md')}`);
await copyFile(join(cwd, 'LICENSE.md'), join(inputDir, 'LICENSE.md'));
Copy link
Member

@styfle styfle Sep 8, 2023

Choose a reason for hiding this comment

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

Let's add something like:

await copyFile(join(cwd, 'marked.min.js'), join(outputDir, 'marked.min.js''));

Then in the client side JS of the Demo, you can fetch the latest for the given deployment with:

fetch(new URL('/marked.min.js', window.location))`

Copy link
Member Author

Choose a reason for hiding this comment

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

Is there a way to get the PR vercel link with just a PR#?

Copy link
Member Author

Choose a reason for hiding this comment

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

I found it based on the vercel comment View Preview link

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

or we don't even need the pr version because now we can go to the preview and use /marked.min.js

Copy link
Member

@styfle styfle Sep 9, 2023

Choose a reason for hiding this comment

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

Exactly, we don’t need a text input anymore. Either you select an old version or you select “HEAD”. And HEAD for a production deployment is master branch and for a preview deployment it’s the PR branch.

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Great work, thanks! 🎉

@UziTech UziTech merged commit 7d95a91 into markedjs:master Sep 9, 2023
10 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 9, 2023
# [9.0.0](v8.0.1...v9.0.0) (2023-09-09)

### Bug Fixes

* Clean up files in repo ([#2963](#2963)) ([7d95a91](7d95a91))

### BREAKING CHANGES

* - remove built files from git repo.
  - If you need to use the latest version of marked on the web you can use a cdn to get marked.min.js from npm:
  - `https://cdn.jsdelivr.net/npm/marked/marked.min.js`
@UziTech UziTech deleted the remove-built branch September 16, 2023 21:20
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.

3 participants