Skip to content

Commit

Permalink
Bunlding a cjs build
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Oct 3, 2024
1 parent acac73a commit 9828e03
Show file tree
Hide file tree
Showing 4 changed files with 1,787 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@

# build
/dist
/cjs
/browser
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')

.PHONY: build
build: dist/build
build: dist/build cjs/index.cjs

.PHONY: clean
clean:
rm -r dist/
rm -r dist/ cjs/

.PHONY: test
test: lint test/httpwg-tests/list.json dist/build
Expand All @@ -32,5 +32,9 @@ dist/build: $(SOURCE_FILES)
@# A fake file to keep track of the last build time
touch dist/build

cjs/index.cjs: ${SOURCE_FILES}
mkdir -p cjs
npx tsup -d cjs --format cjs src/index.ts --dts --sourcemap

test/httpwg-tests/list.json:
git clone https://github.com/httpwg/structured-header-tests test/httpwg-tests
Loading

0 comments on commit 9828e03

Please sign in to comment.