Compare commits
2 Commits
0e552ec4f5
...
020ac91ab9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
020ac91ab9 | ||
|
|
b9f675d1b9 |
@@ -5,7 +5,7 @@ Treat a directory as a template. File paths and contents support conditionals (`
|
|||||||
## Install
|
## Install
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bun install tdir zod
|
bun add @gregorlohaus/tdir zod
|
||||||
```
|
```
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, lib, config, inputs, ... }:
|
{ pkgs, lib, config, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
packages = [ pkgs.bun ];
|
packages = [ pkgs.bun pkgs.nodejs_24];
|
||||||
languages.typescript.enable = true;
|
languages.typescript.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
26
package.json
26
package.json
@@ -1,14 +1,26 @@
|
|||||||
{
|
{
|
||||||
"name": "tdir",
|
"name": "@gregorlohaus/tdir",
|
||||||
"module": "index.ts",
|
"version": "0.1.0",
|
||||||
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"devDependencies": {
|
"main": "./dist/index.js",
|
||||||
"@types/bun": "^1.3.11"
|
"types": "./dist/index.d.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"files": ["dist"],
|
||||||
|
"scripts": {
|
||||||
|
"build": "bun build ./index.ts --outdir ./dist --target node --external zod && bunx tsc --project tsconfig.build.json",
|
||||||
|
"test": "bun test"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/bun": "^1.3.11",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"peerDependencies": {
|
||||||
"zod": "^4.3.6"
|
"zod": "^4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
tsconfig.build.json
Normal file
10
tsconfig.build.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"noEmit": false,
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"outDir": "./dist"
|
||||||
|
},
|
||||||
|
"include": ["index.ts", "parser.ts", "render.ts"]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user