elrh-cosca 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -29,6 +29,22 @@ Path to `targetFile` is relative to `process.cwd()` which allows consumers to ru
|
|
|
29
29
|
|
|
30
30
|
By default the function asks for confirmation before attempting to create the file and if the file with the same name as `targetFile` is detected. Setting the last optional parameter `force` to `true` will suppress manual confirmation prompts.
|
|
31
31
|
|
|
32
|
+
#### `createFileFromWebTemplate`
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
async function createFileWebFromTemplate(
|
|
36
|
+
url: string, targetFile: string, force: boolean = false
|
|
37
|
+
): Promise<void>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Gets a file definition from given `url` and will create a fresh copy in target project when invoked.
|
|
41
|
+
|
|
42
|
+
Contents of `url` must be accessible via `node:https.get` function and will be fetched as raw string data.
|
|
43
|
+
|
|
44
|
+
Path to `targetFile` is relative to `process.cwd()` which allows consumers to run `npx your-script` in their project roots during development.
|
|
45
|
+
|
|
46
|
+
By default the function asks for confirmation before attempting to create the file and if the file with the same name as `targetFile` is detected. Setting the last optional parameter `force` to `true` will suppress manual confirmation prompts.
|
|
47
|
+
|
|
32
48
|
#### `updateConfigFile`
|
|
33
49
|
|
|
34
50
|
```ts
|
|
@@ -99,6 +115,22 @@ async function promptUser(question: string): Promise<boolean>
|
|
|
99
115
|
|
|
100
116
|
Prints out a `question` to the console and waits for the input. Returns `true` when `y` is pressed and `false` otherwise.
|
|
101
117
|
|
|
118
|
+
#### `showMessage`
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
async function showMessage(message: string, newlines: number = 1): Promise<void>
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Prints out a `message` to `process.stdout` and adds the specified number of newlines after it (default is 1).
|
|
125
|
+
|
|
126
|
+
#### `showError`
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
async function showError(message: string, newlines: number = 1): Promise<void>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Prints out a `message` to `process.stderr` and adds the specified number of newlines after it (default is 1).
|
|
133
|
+
|
|
102
134
|
### List of other utils
|
|
103
135
|
|
|
104
136
|
#### `parseQualifiedPath`
|