Skip to content

Commit fe8f88b

Browse files
committed
chore: update readme
1 parent b684742 commit fe8f88b

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# LibPDF
22

3+
[![npm](https://img.shields.io/npm/v/@libpdf/core)](https://www.npmjs.com/package/@libpdf/core)
4+
[![npm downloads](https://img.shields.io/npm/dm/@libpdf/core)](https://www.npmjs.com/package/@libpdf/core)
5+
[![CI](https://github.com/LibPDF-js/core/actions/workflows/ci.yml/badge.svg)](https://github.com/LibPDF-js/core/actions/workflows/ci.yml)
6+
[![GitHub stars](https://img.shields.io/github/stars/libpdf-js/core?style=flat)](https://github.com/LibPDF-js/core)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8+
[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
9+
310
A modern PDF library for TypeScript. Parse, modify, and generate PDFs with a clean, intuitive API.
411

512
> **Beta Software**: LibPDF is under active development and APIs may change between minor versions, but we use it in production at [Documenso](https://documenso.com) and consider it ready for real-world use.

scripts/loc.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
# Count lines of TypeScript code
3+
4+
# csv format: files,language,blank,comment,code
5+
src_csv=$(cloc src --include-lang=TypeScript --not-match-f='\.test\.ts$' --csv --quiet | tail -1)
6+
test_csv=$(cloc src --include-lang=TypeScript --match-f='\.test\.ts$' --csv --quiet | tail -1)
7+
8+
src_code=$(echo "$src_csv" | cut -d, -f5)
9+
src_comment=$(echo "$src_csv" | cut -d, -f4)
10+
test_code=$(echo "$test_csv" | cut -d, -f5)
11+
test_comment=$(echo "$test_csv" | cut -d, -f4)
12+
13+
printf " %8s %8s\n" "code" "comments"
14+
printf "src: %'8d %'8d\n" "$src_code" "$src_comment"
15+
printf "test: %'8d %'8d\n" "$test_code" "$test_comment"
16+
printf "total: %'8d %'8d\n" "$((src_code + test_code))" "$((src_comment + test_comment))"

0 commit comments

Comments
 (0)