npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@coocoo/pre-publish

v0.0.1

Published

帮助eden项目配置合适的发布环境

Downloads

8

Readme

@ies/pre-publish

用于辅助lerna管理的项目配置指定依赖模块;给项目加上tag,生成对应的changelog文档等

安装

npm install --save-dev @ies/pre-publish

使用

1、配置eden项目发布环境

  • docker环境:prePublish eden docker
  • local环境:prePublish eden local
  • alpha环境:prePublish eden alpha

配置文件说明:

在项目的根目录创建 pre.publish.js

module.exports = {
    local: [
        {
            targetPackageName: 'package1',
            removePackages: ['package2', 'package3'],
            addPackages: [],
            targetPkgAsLernaLocalPkgsDep: ['package0'] // 可选择填写
        }
    ],
  	docker: [],
  	alpha: [],
  	common: [] // 通用配置,可以自行定制配置
}

pre.publish.js中配置参数说明:

| 属性 | 类型 | 必填 | 描述 | | ---------------------------- | ------ | ----- | ------------------------------------------------------------ | | targetPackageName | String | true | 目标模块 | | removePackages | Arrray | false | 在目标模中卸载依赖模块(类似 npm uninstall —save xxx) | | addPackages | Arrray | false | 在目标模块中安装依赖模块(类似 npm install —save-dev xxx) | | targetPkgAsLernaLocalPkgsDep | Arrray | False | 将目标模块作为数组中模块的指定版本的依赖模块。(类似lerna add targetPackageName —exact —scope xxx) |

2、standard-version 功能

  • 自动升级版本号
  • 自动生成CHANGELOG.md
  • 自动打tag

常用命令:

发布首个版本

prePublish release --first-release

发布预发版本可以使用--prerelease 标记,如:

prePublish release --prerelease

如果当前版本是v1.0.0,在上述命令后你的版本将变为 v1.0.1-0。如果预发版本要包含alpha前缀,可以通过 --prerelease <name>设置前缀。如:

prePublish release --prerelease alpha

此时版本号将变为 v1.0.1-alpha.0。除了 --first-release—prerelease标志外,还支持--release-as 它支持三种不同的参数:majorminorpatch,使用方式如下:

prePublish release --release-as minor

更多命令:prePublish release -h