input-from-file 0.1.0-alpha.3 → 0.2.0

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.
Files changed (2) hide show
  1. package/README.md +7 -2
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <h1 align="center">input-from-file</h1>
2
2
 
3
- <p align="center"><code>create</code> input that reads a file as JSON.</p>
3
+ <p align="center"><code>create</code> input that reads a file as text.</p>
4
4
 
5
5
  <p align="center">
6
6
  <a href="https://github.com/JoshuaKGoldberg/create/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="🤝 Code of Conduct: Kept" src="https://img.shields.io/badge/%F0%9F%A4%9D_code_of_conduct-kept-21bb42" /></a>
@@ -23,4 +23,9 @@ await take(inputFromFile, { filePath: "data.txt" });
23
23
 
24
24
  `inputFromFile` takes a single argument, `filePath`, of type `string`.
25
25
 
26
- See **[create-josh.vercel.app > Engine > Runtime > Inputs](https://create-josh.vercel.app/engine/runtime/inputs)** for more documentation on Inputs.
26
+ It reads the `filePath` from disk and returns either:
27
+
28
+ - `Error`: If an error was caught reading the file
29
+ - `string`: The text contents of the file
30
+
31
+ See **[create.bingo > Templating Engine > Runtime > Inputs](https://create.bingo/engine/runtime/inputs)** for more documentation on Inputs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "input-from-file",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.2.0",
4
4
  "description": "create input that reads a file as text.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,10 +24,10 @@
24
24
  "zod": "^3.24.1"
25
25
  },
26
26
  "devDependencies": {
27
- "create-testers": "0.1.0-alpha.7"
27
+ "create-testers": "^0.2.0"
28
28
  },
29
29
  "peerDependencies": {
30
- "create": "0.1.0-alpha.7"
30
+ "create": "^0.2.0"
31
31
  },
32
32
  "engines": {
33
33
  "node": ">=18"