Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coocoo/pre-publish

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coocoo/pre-publish

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

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@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中配置参数说明:

属性类型必填描述
targetPackageNameStringtrue目标模块
removePackagesArrrayfalse目标模中卸载依赖模块(类似 npm uninstall —save xxx)
addPackagesArrrayfalse目标模块中安装依赖模块(类似 npm install —save-dev xxx)
targetPkgAsLernaLocalPkgsDepArrrayFalse目标模块作为数组中模块的指定版本的依赖模块。(类似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

Keywords

FAQs

Package last updated on 13 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc