File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ SRC_JS_FILES := $(wildcard src/*.js)
44SRC_TS_FILES := $(wildcard src/* .ts)
55
66.PHONY : all
7- all : dist/index.js dist/cli.js check
7+ all : dist/index.js dist/index.d.ts dist/ cli.js check
88
99.PHONY : clean
1010clean :
@@ -26,7 +26,10 @@ build/%.O3.wasm: build/%.wasm
2626 wasm-opt -O3 --enable-bulk-memory-opt -o $@ $<
2727
2828dist/index.js : build/ohmRuntime.wasm_sections.ts $(SRC_JS_FILES ) $(SRC_TS_FILES )
29- pnpm esbuild index.ts --bundle --loader:.ts=ts --outfile=dist/index.js --format=esm --platform=node --external:ohm-js
29+ pnpm esbuild index.js --bundle --loader:.ts=ts --outfile=dist/index.js --format=esm --platform=node --external:ohm-js
30+
31+ dist/index.d.ts :
32+ cp index.d.ts dist/index.d.ts
3033
3134dist/cli.js : dist/index.js src/cli.js
3235 pnpm esbuild src/cli.js --bundle --loader:.ts=ts --outfile=dist/cli.js --format=esm --platform=node --external:ohm-js --external:./index.js --banner:js=" #!/usr/bin/env node"
Original file line number Diff line number Diff line change 1+ import type { Grammar } from 'ohm-js' ;
2+
3+ export class Compiler {
4+ grammar : Grammar ;
5+
6+ constructor ( grammar : Grammar ) ;
7+ compile ( ) : Uint8Array < ArrayBuffer > ;
8+ }
File renamed without changes.
Original file line number Diff line number Diff line change 11{
22 "name" : " @ohm-js/wasm" ,
3- "version" : " 0.2 .0" ,
3+ "version" : " 0.3 .0" ,
44 "description" : " Compile Ohm.js grammars to WebAsssembly" ,
55 "main" : " dist/index.js" ,
66 "bin" : {
Original file line number Diff line number Diff line change 22 "extends" : " ../tsconfig.base.json" ,
33 "compilerOptions" : {
44 "outDir" : " dist" ,
5+ "noEmit" : true ,
56
67 // From the totaltypescript "Building for a Library in a Monorepo"
78 // recommendation. See tsconfig.base.json for details.
You can’t perform that action at this time.
0 commit comments