Skip to content

Commit 34d15e2

Browse files
authored
Include the scope @codemonger-io in the package name (#6)
* chore: bump dependencies * chore: make scripts package-manager-agnostic Installs `npm-run-all2` and replaces `npm run` in `package.json` with `run-s`. * chore: clean dist folder before build The `build` script removes the `dist` folder before building the package. Uses `rimraf` to support multiple platforms. * chore: include scoe in package name Replaces the package name → `@codemonger-io/mapping-template-compose`. Also bumps the version to 0.2.0. * docs: update README.md Topics: - Includes the scope `@codemonger-io` in the import statements in the code snippets - Bumps the version tag → v0.2.0 - Replaces `npm` with `pnpm` * docs: update API documentation Because the package name was changed.
1 parent 748a5e6 commit 34d15e2

22 files changed

+2966
-1816
lines changed

README.ja.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## ライブラリをインストールする
1010

1111
```sh
12-
npm install https://github.com/codemonger-io/mapping-template-compose.git#v0.1.1
12+
npm install https://github.com/codemonger-io/mapping-template-compose.git#v0.2.0
1313
```
1414

1515
## 動機
@@ -109,7 +109,7 @@ const date = `"date": "$util.escapeJavaScript($util.urlDecode($input.params("dat
109109
このライブラリを用いると前節の例は以下のように書き換えられます。
110110

111111
```ts
112-
import { composeMappingTemplate, ifThen } from 'mapping-template-compose';
112+
import { composeMappingTemplate, ifThen } from '@codemonger-io/mapping-template-compose';
113113

114114
composeMappingTemplate([
115115
ifThen(
@@ -130,7 +130,7 @@ composeMappingTemplate([
130130
さらにモジュール化することもできます。
131131

132132
```ts
133-
import { type KeyValue, composeMappingTemplate, ifThen } from 'mapping-template-compose';
133+
import { type KeyValue, composeMappingTemplate, ifThen } from '@codemonger-io/mapping-template-compose';
134134

135135
const username: KeyValue = ['username', `"$util.escapeJavaScript($util.urlDecode($input.params("username"))).replaceAll("\\'", "'")"`];
136136
const signature: KeyValue = ['signature', '$input.json("$.signature")'];
@@ -163,23 +163,23 @@ APIドキュメントは[`./api-docs/markdown`フォルダ](./api-docs/markdown/
163163
### 依存関係の解決
164164

165165
```sh
166-
npm ci
166+
pnpm install --frozen-lockfile
167167
```
168168

169169
### ビルド
170170

171171
```sh
172-
npm run build
172+
pnpm build
173173
```
174174

175175
### テスト
176176

177177
```sh
178-
npm test
178+
pnpm test
179179
```
180180

181181
### APIドキュメントの生成
182182

183183
```sh
184-
npm run build:doc
184+
pnpm build:doc
185185
```

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This library is especially powerful if you combine it with [AWS Cloud Developmen
99
## Installing this library
1010

1111
```sh
12-
npm install https://github.com/codemonger-io/mapping-template-compose.git#v0.1.1
12+
npm install https://github.com/codemonger-io/mapping-template-compose.git#v0.2.0
1313
```
1414

1515
## Motivation
@@ -109,7 +109,7 @@ This library is intended to **relieve the pain of writing mapping templates** li
109109
You can rewrite the example in the previous section with this library into:
110110

111111
```ts
112-
import { composeMappingTemplate, ifThen } from 'mapping-template-compose';
112+
import { composeMappingTemplate, ifThen } from '@codemonger-io/mapping-template-compose';
113113

114114
composeMappingTemplate([
115115
ifThen(
@@ -130,7 +130,7 @@ composeMappingTemplate([
130130
You can make it further modular:
131131

132132
```ts
133-
import { type KeyValue, composeMappingTemplate, ifThen } from 'mapping-template-compose';
133+
import { type KeyValue, composeMappingTemplate, ifThen } from '@codemonger-io/mapping-template-compose';
134134

135135
const username: KeyValue = ['username', `"$util.escapeJavaScript($util.urlDecode($input.params("username"))).replaceAll("\\'", "'")"`];
136136
const signature: KeyValue = ['signature', '$input.json("$.signature")'];
@@ -163,23 +163,23 @@ You can find the API documentation in [`./api-docs/markdown` folder](./api-docs/
163163
### Resolving dependencies
164164

165165
```sh
166-
npm ci
166+
pnpm install --frozen-lockfile
167167
```
168168

169169
### Building
170170

171171
```sh
172-
npm run build
172+
pnpm build
173173
```
174174

175175
### Testing
176176

177177
```sh
178-
npm test
178+
pnpm test
179179
```
180180

181181
### Generating the API documentation
182182

183183
```sh
184-
npm run build:doc
184+
pnpm build:doc
185185
```

api-docs/mapping-template-compose.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## API Report File for "mapping-template-compose"
1+
## API Report File for "@codemonger-io/mapping-template-compose"
22

33
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
44

api-docs/markdown/index.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,26 @@
66

77
## Packages
88

9-
| Package | Description |
10-
| --- | --- |
11-
| [mapping-template-compose](./mapping-template-compose.md) | Compose API Gateway mapping templates. |
9+
<table><thead><tr><th>
1210

11+
Package
12+
13+
14+
</th><th>
15+
16+
Description
17+
18+
19+
</th></tr></thead>
20+
<tbody><tr><td>
21+
22+
[@codemonger-io/mapping-template-compose](./mapping-template-compose.md)
23+
24+
25+
</td><td>
26+
27+
Compose API Gateway mapping templates.
28+
29+
30+
</td></tr>
31+
</tbody></table>

api-docs/markdown/mapping-template-compose.andcommaconditions.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [mapping-template-compose](./mapping-template-compose.md) &gt; [andCommaConditions](./mapping-template-compose.andcommaconditions.md)
3+
[Home](./index.md) &gt; [@codemonger-io/mapping-template-compose](./mapping-template-compose.md) &gt; [andCommaConditions](./mapping-template-compose.andcommaconditions.md)
44

55
## andCommaConditions() function
66

@@ -17,10 +17,37 @@ export declare function andCommaConditions(...conditions: string[]): string;
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| conditions | string\[\] | |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
conditions
39+
40+
41+
</td><td>
42+
43+
string\[\]
44+
45+
46+
</td><td>
47+
48+
49+
</td></tr>
50+
</tbody></table>
2451
**Returns:**
2552

2653
string

api-docs/markdown/mapping-template-compose.composemappingtemplate.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [mapping-template-compose](./mapping-template-compose.md) &gt; [composeMappingTemplate](./mapping-template-compose.composemappingtemplate.md)
3+
[Home](./index.md) &gt; [@codemonger-io/mapping-template-compose](./mapping-template-compose.md) &gt; [composeMappingTemplate](./mapping-template-compose.composemappingtemplate.md)
44

55
## composeMappingTemplate() function
66

@@ -17,10 +17,37 @@ export declare function composeMappingTemplate(items: MappingTemplateItem[]): st
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| items | [MappingTemplateItem](./mapping-template-compose.mappingtemplateitem.md)<!-- -->\[\] | |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
items
39+
40+
41+
</td><td>
42+
43+
[MappingTemplateItem](./mapping-template-compose.mappingtemplateitem.md)<!-- -->\[\]
44+
45+
46+
</td><td>
47+
48+
49+
</td></tr>
50+
</tbody></table>
2451
**Returns:**
2552

2653
string

api-docs/markdown/mapping-template-compose.getcommaconditionafterifblock.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [mapping-template-compose](./mapping-template-compose.md) &gt; [getCommaConditionAfterIfBlock](./mapping-template-compose.getcommaconditionafterifblock.md)
3+
[Home](./index.md) &gt; [@codemonger-io/mapping-template-compose](./mapping-template-compose.md) &gt; [getCommaConditionAfterIfBlock](./mapping-template-compose.getcommaconditionafterifblock.md)
44

55
## getCommaConditionAfterIfBlock() function
66

@@ -17,10 +17,37 @@ export declare function getCommaConditionAfterIfBlock(ifBlock: IfBlock): string;
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| ifBlock | [IfBlock](./mapping-template-compose.ifblock.md) | |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
ifBlock
39+
40+
41+
</td><td>
42+
43+
[IfBlock](./mapping-template-compose.ifblock.md)
44+
45+
46+
</td><td>
47+
48+
49+
</td></tr>
50+
</tbody></table>
2451
**Returns:**
2552

2653
string

api-docs/markdown/mapping-template-compose.getcommaconditionafteritem.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [mapping-template-compose](./mapping-template-compose.md) &gt; [getCommaConditionAfterItem](./mapping-template-compose.getcommaconditionafteritem.md)
3+
[Home](./index.md) &gt; [@codemonger-io/mapping-template-compose](./mapping-template-compose.md) &gt; [getCommaConditionAfterItem](./mapping-template-compose.getcommaconditionafteritem.md)
44

55
## getCommaConditionAfterItem() function
66

@@ -17,10 +17,37 @@ export declare function getCommaConditionAfterItem(item: MappingTemplateItem): s
1717

1818
## Parameters
1919

20-
| Parameter | Type | Description |
21-
| --- | --- | --- |
22-
| item | [MappingTemplateItem](./mapping-template-compose.mappingtemplateitem.md) | |
20+
<table><thead><tr><th>
2321

22+
Parameter
23+
24+
25+
</th><th>
26+
27+
Type
28+
29+
30+
</th><th>
31+
32+
Description
33+
34+
35+
</th></tr></thead>
36+
<tbody><tr><td>
37+
38+
item
39+
40+
41+
</td><td>
42+
43+
[MappingTemplateItem](./mapping-template-compose.mappingtemplateitem.md)
44+
45+
46+
</td><td>
47+
48+
49+
</td></tr>
50+
</tbody></table>
2451
**Returns:**
2552

2653
string

api-docs/markdown/mapping-template-compose.ifblock.blocktype.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [mapping-template-compose](./mapping-template-compose.md) &gt; [IfBlock](./mapping-template-compose.ifblock.md) &gt; [blockType](./mapping-template-compose.ifblock.blocktype.md)
3+
[Home](./index.md) &gt; [@codemonger-io/mapping-template-compose](./mapping-template-compose.md) &gt; [IfBlock](./mapping-template-compose.ifblock.md) &gt; [blockType](./mapping-template-compose.ifblock.blocktype.md)
44

55
## IfBlock.blockType property
66

api-docs/markdown/mapping-template-compose.ifblock.condition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
22

3-
[Home](./index.md) &gt; [mapping-template-compose](./mapping-template-compose.md) &gt; [IfBlock](./mapping-template-compose.ifblock.md) &gt; [condition](./mapping-template-compose.ifblock.condition.md)
3+
[Home](./index.md) &gt; [@codemonger-io/mapping-template-compose](./mapping-template-compose.md) &gt; [IfBlock](./mapping-template-compose.ifblock.md) &gt; [condition](./mapping-template-compose.ifblock.condition.md)
44

55
## IfBlock.condition property
66

0 commit comments

Comments
 (0)