Skip to content

Commit

Permalink
Merge pull request #68 from badgateway/cjs-build
Browse files Browse the repository at this point in the history
Bundling CJS in npm build
  • Loading branch information
evert authored Oct 3, 2024
2 parents acac73a + 4f396a7 commit f0c7589
Show file tree
Hide file tree
Showing 5 changed files with 1,788 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
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ChangeLog

* #66: We now convert from/to ArrayBuffer instead of a custom ByteSequence
object. This is a breaking change.
* Bundling CommonJS for backwards compat.


2.0.0-alpha.1 (2024-02-23)
Expand Down
Loading

0 comments on commit f0c7589

Please sign in to comment.