Skip to content

Commit

Permalink
fix: add bin entry to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
ozum committed Feb 25, 2021
1 parent e8d9080 commit af73f55
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 33 deletions.
64 changes: 32 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ Context provided to render function.
| `o` | Db \| DbObject |
| `x` | _Record_<string, any\> |

Defined in: [types/index.ts:53](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L53)
Defined in: [types/index.ts:53](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L53)

---

### Options

Ƭ **Options**: [_GeneratorOptions_](#interfacesgeneratoroptionsmd) & ClientOptions

Defined in: [types/index.ts:50](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L50)
Defined in: [types/index.ts:50](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L50)

## Functions

Expand All @@ -141,7 +141,7 @@ generate(require.resolve("./local-generator"), options);

**Returns:** _Promise_<void\>

Defined in: [generate.ts:15](https://github.com/ozum/pg-generator/blob/bf53108/src/generate.ts#L15)
Defined in: [generate.ts:15](https://github.com/ozum/pg-generator/blob/e8d9080/src/generate.ts#L15)

**generate**(`generator`: _string_, `subGenerator?`: _string_, `options?`: [_Options_](#options)): _Promise_<void\>

Expand All @@ -164,7 +164,7 @@ generate(require.resolve("./local-generator"), "sub-generator", options);

**Returns:** _Promise_<void\>

Defined in: [generate.ts:27](https://github.com/ozum/pg-generator/blob/bf53108/src/generate.ts#L27)
Defined in: [generate.ts:27](https://github.com/ozum/pg-generator/blob/e8d9080/src/generate.ts#L27)

# Classes

Expand Down Expand Up @@ -205,7 +205,7 @@ Creates an instance of PgGenerator.

**Returns:** [_PgGenerator_](#classespggeneratormd)<O\>

Defined in: [pg-generator.ts:23](https://github.com/ozum/pg-generator/blob/bf53108/src/pg-generator.ts#L23)
Defined in: [pg-generator.ts:23](https://github.com/ozum/pg-generator/blob/e8d9080/src/pg-generator.ts#L23)

## Methods

Expand All @@ -223,7 +223,7 @@ Additionally copies all files in `[rootDir]/files` to the output directory.

**Returns:** _Promise_<void\>

Defined in: [pg-generator.ts:47](https://github.com/ozum/pg-generator/blob/bf53108/src/pg-generator.ts#L47)
Defined in: [pg-generator.ts:47](https://github.com/ozum/pg-generator/blob/e8d9080/src/pg-generator.ts#L47)

# Interfaces

Expand All @@ -243,7 +243,7 @@ Options for generation and reverse engineering process. Options extends [pg-stru

Whether to clear the destination directory before creating files.

Defined in: [types/index.ts:7](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L7)
Defined in: [types/index.ts:7](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L7)

---

Expand All @@ -253,7 +253,7 @@ Defined in: [types/index.ts:7](https://github.com/ozum/pg-generator/blob/bf53108

Extra context data. This data is merged with and overridden by data from context file.

Defined in: [types/index.ts:13](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L13)
Defined in: [types/index.ts:13](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L13)

---

Expand All @@ -263,7 +263,7 @@ Defined in: [types/index.ts:13](https://github.com/ozum/pg-generator/blob/bf5310

Path to a JSON or JS file providing extra context for templates.

Defined in: [types/index.ts:11](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L11)
Defined in: [types/index.ts:11](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L11)

---

Expand All @@ -273,7 +273,7 @@ Defined in: [types/index.ts:11](https://github.com/ozum/pg-generator/blob/bf5310

Whether to log output to console.

Defined in: [types/index.ts:15](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L15)
Defined in: [types/index.ts:15](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L15)

---

Expand All @@ -283,7 +283,7 @@ Defined in: [types/index.ts:15](https://github.com/ozum/pg-generator/blob/bf5310

Path of the output directory.

Defined in: [types/index.ts:9](https://github.com/ozum/pg-generator/blob/bf53108/src/types/index.ts#L9)
Defined in: [types/index.ts:9](https://github.com/ozum/pg-generator/blob/e8d9080/src/types/index.ts#L9)

# Modules

Expand Down Expand Up @@ -317,7 +317,7 @@ camelCase("user-name"); // userName

string as camel case.

Defined in: [utils/filter-functions.ts:48](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L48)
Defined in: [utils/filter-functions.ts:48](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L48)

---

Expand All @@ -343,7 +343,7 @@ classCase("user-name"); // UserName

string as class case.

Defined in: [utils/filter-functions.ts:74](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L74)
Defined in: [utils/filter-functions.ts:74](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L74)

---

Expand Down Expand Up @@ -373,7 +373,7 @@ clearDefaultValue("'No ''value'' given'"); // "No value 'given'"

default value to be used in a template.

Defined in: [utils/filter-functions.ts:26](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L26)
Defined in: [utils/filter-functions.ts:26](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L26)

---

Expand All @@ -399,7 +399,7 @@ dashCase("User Name"); // user-name

string as dash case.

Defined in: [utils/filter-functions.ts:100](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L100)
Defined in: [utils/filter-functions.ts:100](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L100)

---

Expand All @@ -418,7 +418,7 @@ Returns given the given database object name as a class name.

**Returns:** _string_

Defined in: [utils/filter-functions.ts:319](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L319)
Defined in: [utils/filter-functions.ts:319](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L319)

---

Expand All @@ -445,7 +445,7 @@ columnTypeModifier(name); // (20)

modifier string.

Defined in: [utils/filter-functions.ts:333](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L333)
Defined in: [utils/filter-functions.ts:333](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L333)

---

Expand All @@ -471,7 +471,7 @@ plural("User_name"); // User_name

string with lower first case.

Defined in: [utils/filter-functions.ts:139](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L139)
Defined in: [utils/filter-functions.ts:139](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L139)

---

Expand Down Expand Up @@ -503,7 +503,7 @@ Text line 2

**Returns:** _string_

Defined in: [utils/filter-functions.ts:237](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L237)
Defined in: [utils/filter-functions.ts:237](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L237)

---

Expand All @@ -525,7 +525,7 @@ Pads given string's end with given padding string to complete its length to coun

the string padded with padding string.

Defined in: [utils/filter-functions.ts:216](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L216)
Defined in: [utils/filter-functions.ts:216](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L216)

---

Expand All @@ -551,7 +551,7 @@ pascalCase("user-name"); // UserName

string as pascal case.

Defined in: [utils/filter-functions.ts:61](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L61)
Defined in: [utils/filter-functions.ts:61](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L61)

---

Expand All @@ -577,7 +577,7 @@ plural("user_name"); // user_names

string in plural form.

Defined in: [utils/filter-functions.ts:126](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L126)
Defined in: [utils/filter-functions.ts:126](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L126)

---

Expand All @@ -603,7 +603,7 @@ plural("user_name"); // "user_name"

string with quotes.

Defined in: [utils/filter-functions.ts:152](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L152)
Defined in: [utils/filter-functions.ts:152](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L152)

---

Expand All @@ -623,7 +623,7 @@ If given data is a multi line string replcaes new lines with escape characters.

the string with escape characters.

Defined in: [utils/filter-functions.ts:293](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L293)
Defined in: [utils/filter-functions.ts:293](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L293)

---

Expand All @@ -649,7 +649,7 @@ plural("Some 'example' text"); // 'some \'example\' text'

string with quotes.

Defined in: [utils/filter-functions.ts:165](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L165)
Defined in: [utils/filter-functions.ts:165](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L165)

---

Expand All @@ -675,7 +675,7 @@ singular("user_names"); // user_name

string in singular form.

Defined in: [utils/filter-functions.ts:113](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L113)
Defined in: [utils/filter-functions.ts:113](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L113)

---

Expand All @@ -701,7 +701,7 @@ snakeCase("userName"); // user_name

string as snake case.

Defined in: [utils/filter-functions.ts:87](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L87)
Defined in: [utils/filter-functions.ts:87](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L87)

---

Expand All @@ -727,7 +727,7 @@ If given data is object or array, converts it to string.

converted value.

Defined in: [utils/filter-functions.ts:270](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L270)
Defined in: [utils/filter-functions.ts:270](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L270)

---

Expand All @@ -748,7 +748,7 @@ Vairadic function which strips all of the given strings or database object's nam

converted string.

Defined in: [utils/filter-functions.ts:202](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L202)
Defined in: [utils/filter-functions.ts:202](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L202)

---

Expand All @@ -769,7 +769,7 @@ Vairadic function which strips all of the given strings or database object's nam

converted string.

Defined in: [utils/filter-functions.ts:176](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L176)
Defined in: [utils/filter-functions.ts:176](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L176)

---

Expand All @@ -790,7 +790,7 @@ Vairadic function which strips all of the given strings or database object's nam

converted string.

Defined in: [utils/filter-functions.ts:189](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L189)
Defined in: [utils/filter-functions.ts:189](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L189)

---

Expand All @@ -816,4 +816,4 @@ Returns given array with unique elements by eliminating duplicate values.

the array with unique values.

Defined in: [utils/filter-functions.ts:303](https://github.com/ozum/pg-generator/blob/bf53108/src/utils/filter-functions.ts#L303)
Defined in: [utils/filter-functions.ts:303](https://github.com/ozum/pg-generator/blob/e8d9080/src/utils/filter-functions.ts#L303)
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"!dist/**/__test__",
"module-files"
],
"bin": "dist/bin/pgen.js",
"bin": {
"pgen": "dist/bin/pgen.js"
},
"homepage": "https://www.pg-generator.com",
"bugs": "https://github.com/ozum/pg-generator/issues",
"repository": "ozum/pg-generator",
Expand Down

0 comments on commit af73f55

Please sign in to comment.