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

Change npm package name to hexo-theme-kratos-rebirth #129

Closed
ArcticLampyrid opened this issue May 21, 2022 · 6 comments
Closed

Change npm package name to hexo-theme-kratos-rebirth #129

ArcticLampyrid opened this issue May 21, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ArcticLampyrid
Copy link
Collaborator

Hexo v5.0 以上支持使用 npm 包形式引用主题,但需要遵守特定命名格式,如 hexo-theme- 前缀
See also 通过 npm 安装主题

p.s. 为了在使用 npm 包时兼顾自定义性,可能需要改变一些与配置相关的东西
如当前最佳的custom background方式实际上是直接替换相关图片文件(这比注入<style>更简洁,且支持dark主题等等)

@ArcticLampyrid ArcticLampyrid added the enhancement New feature or request label May 21, 2022
@ArcticLampyrid
Copy link
Collaborator Author

出于依赖稳定性考虑,npm不允许对已发布的包进行操作。
根据社区推荐方案,首先使用npm deprecate弃用老的npm包,然后使用新名称publish

npm deprecate ${oldName}@"<=${version}" "WARNING: This project has been renamed to ${newName}. Install using ${newName} instead."

@Candinya
Copy link
Owner

custom background 担心的是这种 npm / yarn 安装方式的用户没法修改源文件,所以有这样一个奇怪的妥协接口 🧐

@Candinya
Copy link
Owner

包名也改好了 🎉
为了庆祝直接升级了一个大版本(逃x

@ArcticLampyrid
Copy link
Collaborator Author

虽然但是,好像发得太快了
还得再发一个 bedf870

@Candinya
Copy link
Owner

oops (

@Candinya
Copy link
Owner

直接推了个新包 + 修改了 release tag(逃x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants