Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
Update README, Bump 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nzws committed Jan 6, 2020
1 parent e4c2ee7 commit 39ac64e
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 3,546 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,23 @@
[![code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge&logo=prettier)](https://prettier.io/)
[![dependabot enabled](https://img.shields.io/badge/dependabot-enabled-0366D6.svg?style=for-the-badge&logo=dependabot)](https://github.com/dotplants/now-secrets/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3Adependencies+)

[English](https://github.com/dotplants/now-secrets/blob/master/README.md) | [日本語](https://github.com/dotplants/now-secrets/blob/master/docs/README.ja.md)

# What's this?

**now-secrets** is a command to automatically update ZEIT Now secrets based on .env.
**now-secrets** is a command to automatically update [ZEIT Now](https://zeit.co) secrets based on .env.

**⚠ This is an unofficial project.**

# Getting Started

- Install this command to global.
- Install this package to global.

```bash
npx add-pkg -g now-secrets # add-pkg: https://add-pkg.dotplants.net
```

- Move to your project and edit .env.
- Move to your project and edit `.env`.

```bash
cd /path/to/your-project
Expand All @@ -40,7 +42,7 @@ OTHER_ENV=hogefuga
now-secrets
```

- If successful, `@{project_name}_{env_key}` has been added.
- If successful, `@{prefix}_{env_key}` has been added.

# Config

Expand All @@ -50,7 +52,7 @@ In `package.json`:
{
...
"now_secrets": {
"prefix": "", // default: { project_name }
"prefix": "",
"env_file_name": "" // default: .env
}
}
Expand Down
95 changes: 95 additions & 0 deletions docs/README.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[![now-secrets](https://i.imgur.com/vBAkYuW.png)](https://npm.im/now-secrets)

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/dotplants/now-secrets/Node%20CI?style=for-the-badge)](https://github.com/dotplants/now-secrets/actions)
[![GitHub](https://img.shields.io/github/license/dotplants/now-secrets?style=for-the-badge)](#license)
[![code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge&logo=prettier)](https://prettier.io/)
[![dependabot enabled](https://img.shields.io/badge/dependabot-enabled-0366D6.svg?style=for-the-badge&logo=dependabot)](https://github.com/dotplants/now-secrets/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3Adependencies+)

[English](https://github.com/dotplants/now-secrets/blob/master/README.md) | [日本語](https://github.com/dotplants/now-secrets/blob/master/docs/README.ja.md)

# これは何?

**now-secrets** は .env に基づいて[ZEIT Now](https://zeit.co)のシークレットを自動でアップデートするコマンドを提供します。

**⚠ これは非公式のプロジェクトです。**

# 始める

- このパッケージをグローバルインストールします。

```bash
npx add-pkg -g now-secrets # add-pkg: https://add-pkg.dotplants.net
```

- あなたのプロジェクトに移動し、 `.env` を編集します。

```bash
cd /path/to/your-project
vi .env
```

- `ZEIT_TOKEN` を.env に追加します。
> トークンは https://zeit.co/account/tokens から作成できます。
```
ZEIT_TOKEN=foobar
OTHER_ENV=hogefuga
```

- `now-secrets` を実行します。

```
now-secrets
```

- If successful, `@{prefix}_{env_key}` has been added.

# 設定

`package.json` 内:

```
{
...
"now_secrets": {
"prefix": "",
"env_file_name": "" // デフォルト: .env
}
}
```

- prefix: package.json 内の `now_secrets.prefix` > now.json 内の `name` > package.json 内の `name`
- scope: now.json 内の `scope` > 個人アカウント

# CLI Usage

### 全てのシークレットを更新

```bash
now-secrets
```

### 追加のみ実行

> ZEIT Now の仕様: 既にあるシークレットを新たに追加しようとした場合はエラーが返ります。
```bash
now-secrets --no-remove
```

### 削除のみ実行

```bash
now-secrets --clean
```

### now.json を更新しない

```bash
now-secrets --no-update-now-json
```

# License

- code: MIT
- icon: [Font Awesome - CC BY 4.0 License](https://fontawesome.com/license/free)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "now-secrets",
"version": "1.0.0",
"version": "1.0.1",
"author": "dotPlants HQ <oss@dotplants.net>",
"contributors": [
"nzws <nzws@hq.dotplants.net>"
Expand Down
Loading

0 comments on commit 39ac64e

Please sign in to comment.