Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

chore: use ncc to replace grunt-browserify#1

Merged
ghiscoding merged 2 commits into
ghiscoding:masterfrom
3cp:master
Sep 14, 2020
Merged

chore: use ncc to replace grunt-browserify#1
ghiscoding merged 2 commits into
ghiscoding:masterfrom
3cp:master

Conversation

@3cp
Copy link
Copy Markdown

@3cp 3cp commented Sep 9, 2020

Comment thread demo/demo.html
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
<script type="text/javascript" src="../dist/excel-builder.dist.js"></script>
<script type="text/javascript" src="../dist/index.js"></script>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sorry, direct loading here would not work. Because ncc only builds commonjs dist file, not umd.

Probably can remove the whole demo/ folder from this repo.

@ghiscoding
Copy link
Copy Markdown
Owner

@3cp so I took a quick look at the PR and I see you deleted a few files, it looks like the old grunt files, and there's no compiled dist. I never used ncc, do I just run the build and publish a new version?

Also on npm I see the following
@zeit/ncc is no longer maintained. Please use @vercel/ncc instead

@3cp
Copy link
Copy Markdown
Author

3cp commented Sep 13, 2020

Oh, thx. I will clean it up.

@3cp
Copy link
Copy Markdown
Author

3cp commented Sep 13, 2020

Cleaned up.
Yes, just a version pump then publish. The compiled dist/index.js is already committed.

Alternatively, you can add "prepare": "npm run build" to package.json scripts section to enable refresh build when publishing.

Comment thread package.json
"homepage": "http://excelbuilderjs.com/",
"devDependencies": {
"@vercel/ncc": "^0.24.0"
"@vercel/ncc": "^0.23.0"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@3cp isn't this still going to get latest minor and so 0.24.0? I think we should remove the caret or use ~0.23.0 instead

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Semver has special rule for major version 0, aka pre production.
When major is 0, it treats minor versions (instead normally majors) as breaking change. "^0.23.0" would never match 0.24.x.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

oh ok I didn't know this special rule, thanks for clarifying, I'll merge as is then, it's safe anyway since you already provided the compiled file. Thanks

@ghiscoding ghiscoding merged commit 0cb3d81 into ghiscoding:master Sep 14, 2020
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