Skip to content

Commit 23a695a

Browse files
author
Transcript-Fetch-Admin
committed
chore: scaffold npm package tooling
0 parents  commit 23a695a

5 files changed

Lines changed: 117 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules/
2+
dist/
3+
coverage/
4+
*.log
5+
*.tgz
6+
.DS_Store
7+
.env
8+
.env.*

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 TranscriptFetch
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎package.json‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "transcriptfetch",
3+
"version": "0.1.0",
4+
"description": "Official Node.js/TypeScript SDK for the TranscriptFetch API: fetch YouTube transcripts, channels, playlists, and search as clean, typed data.",
5+
"keywords": [
6+
"youtube",
7+
"transcript",
8+
"captions",
9+
"subtitles",
10+
"api",
11+
"sdk",
12+
"rag",
13+
"llm",
14+
"mcp"
15+
],
16+
"license": "MIT",
17+
"author": "TranscriptFetch <support@transcriptfetch.com>",
18+
"homepage": "https://transcriptfetch.com",
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/TranscriptFetch/node-sdk.git"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/TranscriptFetch/node-sdk/issues"
25+
},
26+
"type": "module",
27+
"main": "./dist/index.cjs",
28+
"module": "./dist/index.js",
29+
"types": "./dist/index.d.ts",
30+
"exports": {
31+
".": {
32+
"types": "./dist/index.d.ts",
33+
"import": "./dist/index.js",
34+
"require": "./dist/index.cjs"
35+
}
36+
},
37+
"files": [
38+
"dist",
39+
"README.md",
40+
"LICENSE",
41+
"CHANGELOG.md"
42+
],
43+
"engines": {
44+
"node": ">=18"
45+
},
46+
"scripts": {
47+
"build": "tsup",
48+
"typecheck": "tsc --noEmit",
49+
"prepublishOnly": "npm run build"
50+
},
51+
"devDependencies": {
52+
"@types/node": "^20.11.30",
53+
"tsup": "^8.0.2",
54+
"typescript": "^5.4.5"
55+
}
56+
}

‎tsconfig.json‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"module": "ESNext",
5+
"moduleResolution": "Bundler",
6+
"lib": ["ES2022", "DOM"],
7+
"declaration": true,
8+
"strict": true,
9+
"noUncheckedIndexedAccess": true,
10+
"noUnusedLocals": true,
11+
"noUnusedParameters": true,
12+
"isolatedModules": true,
13+
"esModuleInterop": true,
14+
"skipLibCheck": true,
15+
"forceConsistentCasingInFileNames": true,
16+
"outDir": "dist"
17+
},
18+
"include": ["src"]
19+
}

‎tsup.config.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { defineConfig } from "tsup";
2+
3+
export default defineConfig({
4+
entry: ["src/index.ts"],
5+
format: ["esm", "cjs"],
6+
dts: true,
7+
clean: true,
8+
sourcemap: true,
9+
target: "node18",
10+
outExtension({ format }) {
11+
return { js: format === "cjs" ? ".cjs" : ".js" };
12+
},
13+
});

0 commit comments

Comments
 (0)