Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (35 loc) · 1.56 KB

HOW-TO-PUBLISH.md

File metadata and controls

43 lines (35 loc) · 1.56 KB

How to publish to npmjs

npmjsに本パッケージをpublishする手順について説明します。

以下のプログラムが入っていることを前提とします。

  • git
  • nodejs v12.14以降
  • npm v6.13以降
  • grunt-cli(npm i -g grunt-cli)

手順を以下に示します。

  1. 本パッケージのクローン 本パッケージをgit cloneにて取得します。
    git clone https://github.com/enebular/enebular-node-red-1.0.git
  2. 必要パッケージのインストール 以下のコマンドを実行します。 npm ci
  3. Versionの変更 Versionを変更します。本パッケージのVersionの規則は1.0.5-alpha.nとし、nの部分を加算していきます。1.0.5の部分は母体としたNode-REDのVersionであり、固定とします。Versionの変更は以下のコマンドにて実施します。
    node scripts/set-package-version.js 1.0.5-alpha.n
  4. release用のパッケージファイル作成 以下のコマンドを実行します。 grunt release
  5. Publish パッケージファイルが作成されたフォルダに移動します。 cd .dist/modules/ 生成されたスクリプトを実行します。 sh publish.sh

publishされるのは以下のパッケージです。

@uhuru/enebular-node-red @uhuru/enebular-node-red-editor-api @uhuru/enebular-node-red-editor-client @uhuru/enebular-node-red-nodes @uhuru/enebular-node-red-registry @uhuru/enebular-node-red-runtime @uhuru/enebular-node-red-util

各パッケージにはtestというタグが付与されます。

以上です。