Skip to content

Commit b4b749a

Browse files
committed
Bump to version 1, use sql-wasm.js as default file
Also: Add additional package.json scripts
1 parent dd8394b commit b4b749a

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ EMFLAGS = \
99
--memory-init-file 0 \
1010
-s RESERVED_FUNCTION_POINTERS=64 \
1111
-s EXPORTED_FUNCTIONS=@exported_functions \
12-
-s EXTRA_EXPORTED_RUNTIME_METHODS=@exported_runtime_methods
12+
-s EXTRA_EXPORTED_RUNTIME_METHODS=@exported_runtime_methods \
13+
-s SINGLE_FILE=0
1314

1415
EMFLAGS_WASM = \
1516
-s WASM=1 \
@@ -29,6 +30,9 @@ OUTPUT_WRAPPER_FILES = js/shell-pre.js js/shell-post.js
2930

3031
all: optimized debug worker
3132

33+
# TODO: Emit a file showing which version of emcc and SQLite was used to compile the emitted output.
34+
# TODO: Make it easier to use a newer version of Sqlite.
35+
3236
.PHONY: debug
3337
debug: js/sql-debug.js js/sql-wasm-debug.js
3438

@@ -86,6 +90,7 @@ js/worker.sql-wasm.js: js/sql-wasm.js js/worker.js
8690
js/worker.sql-wasm-debug.js: js/sql-wasm-debug.js js/worker.js
8791
cat $^ > $@
8892

93+
# TODO: Replace Coffeescript with Typescript or raw JS
8994
js/api.js: coffee/output-pre.js coffee/api.coffee coffee/exports.coffee coffee/api-data.coffee coffee/output-post.js
9095
cat coffee/api.coffee coffee/exports.coffee coffee/api-data.coffee | coffee --bare --compile --stdio > $@
9196
cat coffee/output-pre.js $@ coffee/output-post.js > js/api-wrapped.js

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sql.js",
3-
"version": "0.4.0",
3+
"version": "1.0.0",
44
"description": "SQLite library with support for opening and writing databases, prepared statements, and more. This SQLite library is in pure javascript (compiled with emscripten).",
55
"keywords": [
66
"sql",
@@ -17,10 +17,12 @@
1717
"asm.js"
1818
],
1919
"license": "MIT",
20-
"main": "./js/sql.js",
20+
"main": "./js/sql-wasm.js",
2121
"scripts": {
22-
"test-all": "npm run test && npm run test-debug && npm run test-wasm && npm run test-wasm-debug && npm run test-memory-growth",
23-
"test": "node test/all.js",
22+
"build": "make",
23+
"rebuild": "make clean && make",
24+
"test-all": "npm run test-asm && npm run test-debug && npm run test-wasm && npm run test-wasm-debug && npm run test-memory-growth",
25+
"test-asm": "node test/all.js",
2426
"test-debug": "node test/all.js debug",
2527
"test-wasm": "node test/all.js wasm",
2628
"test-wasm-debug": "node test/all.js wasm-debug",

0 commit comments

Comments
 (0)