err1y

[开源] npm 脚手架,自用的开发环境配置

  •  
  •   err1y · Jul 7, 2021 · 1066 views
    This topic created in 1774 days ago, the information mentioned may be changed or developed.

    现在支持的功能都是我自己常用的环境,有需求可以提交 issue 或在帖子内回复,有时间就写一写

    简介

    把经常使用的 npm 的配置做成了脚手架

    支持功能

    • 根据 npm/git 配置自动生成 author 、version 、license 字段
    • 根据 git 仓库信息自动生成 homepage 、bugs 、repository 字段
    • 根据版本号修改自动打标签并发布到 npmjs (需要 github 仓库配置 secrets.NPM_TOKEN )
    • 配置 commitlint,自动检查 commit 信息是否合规
    • 配置 eslint 和 prettier,做语法检查和格式化

    注意事项

    • auto-publish 后会自动打标签并将当前分支和标签推送到 github,酌情使用,默认关闭

    使用方法

    1. 在 github 上创建仓库并将仓库克隆到本地

    2. 进入仓库执行以下命令

      # 注意以下命令不要忘记 @erriy 后的 --,否则选项将会变成 npm init 的选项,无法传递到脚手架当中
      # 查看使用方法
      npm init @erriy -- -h
      # 使用默认配置自动创建和自动发布功能(注意提前在 github 仓库配置 secrets.NPM_TOKEN )
      npm init @erriy -- --auto-publish
      
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2866 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 12:28 · PVG 20:28 · LAX 05:28 · JFK 08:28
    ♥ Do have faith in what you're doing.