Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-09-04 16:01:08 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2019-10-17 11:47:14 -0400
commitbacefb0752d597cd521b3682072608659c6bdd9d (patch)
tree7907366f2f871d5803e8c341406a9ac2f2efd0ed
parent4f8aa3c90b52700781427b9815d748e915fbd68f (diff)
downloadliza-bacefb0752d597cd521b3682072608659c6bdd9d.tar.gz
liza-bacefb0752d597cd521b3682072608659c6bdd9d.tar.bz2
liza-bacefb0752d597cd521b3682072608659c6bdd9d.zip
Build typescript files
* .gitignore (tsconfig.tsbuildinfo): Ignore generated file (used for incremental builds). * Makefile.am (tsout): New variable an recipe. (modindex, check): Depend on tsout. * dummy.ts: New (temporary) file. Will be removed once we have at least one ts file. * npm-shrinkwrap.json: Update. * package.json.in (devDependencies)[typescript]: New dependency. * tsconfig.json: New configuration file.
-rw-r--r--.gitignore4
-rw-r--r--Makefile.am11
-rw-r--r--README.md2
-rw-r--r--dummy.ts1
-rw-r--r--npm-shrinkwrap.json93
-rw-r--r--package.json.in1
-rw-r--r--tsconfig.json20
7 files changed, 125 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index b7e2a1b..2831abe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,7 @@ src/**/index.js
# npm
node_modules
+
+# typescript
+tsconfig.tsbuildinfo
+
diff --git a/Makefile.am b/Makefile.am
index fe2c8e5..d1a2b1c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -24,6 +24,8 @@ path_test = $(top_builddir)/test
namespaces=$(shell find src -type d)
nsindex=$(addsuffix /index.js, $(namespaces))
+tsout = tsconfig.tsbuildinfo
+
SUBDIRS = doc
EXTRA_DIST = $(path_src) package.json index.js $(path_src)/version.js \
tools autogen.sh README.md $(path_test) \
@@ -35,12 +37,17 @@ all-am: modindex
dist-hook: check
+# used to force typescript compilation (it handles its own incremental
+# compilation and dependency discovery)
+$(tsout): FORCE
+ node_modules/.bin/tsc
+
modindex: $(nsindex)
-%/index.js: FORCE
+%/index.js: FORCE $(tsout)
./tools/gen-index "$*" > "$@"
test: check
-check:
+check: $(tsout)
PATH="$(PATH):$(CURDIR)/node_modules/mocha/bin" \
mocha @NODE_DESTRUCTURE@ \
--require $(path_test)/pre.js \
diff --git a/README.md b/README.md
index 4dcf9f3..9d626fa 100644
--- a/README.md
+++ b/README.md
@@ -39,8 +39,8 @@ If `configure` is not available, see the section "Configuring" above.
```
$ ./configure # see --help for optional arguments
- $ make # build
$ npm install # install js dependencies
+ $ make # build
$ make check # run test cases
```
diff --git a/dummy.ts b/dummy.ts
new file mode 100644
index 0000000..1ba957f
--- /dev/null
+++ b/dummy.ts
@@ -0,0 +1 @@
+/** temporary file to prevent ts build from failing beacuse it can't find files **/
diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json
index 4c1cc70..a476f7c 100644
--- a/npm-shrinkwrap.json
+++ b/npm-shrinkwrap.json
@@ -1,20 +1,105 @@
{
"name": "liza",
- "version": "3.9.5",
+ "version": "7.0.0",
"dependencies": {
+ "amqplib": {
+ "version": "0.5.3",
+ "from": "amqplib@0.5.3",
+ "resolved": "https://registry.npmjs.org/amqplib/-/amqplib-0.5.3.tgz",
+ "dependencies": {
+ "bitsyntax": {
+ "version": "0.1.0",
+ "from": "bitsyntax@>=0.1.0 <0.2.0",
+ "resolved": "https://registry.npmjs.org/bitsyntax/-/bitsyntax-0.1.0.tgz",
+ "dependencies": {
+ "debug": {
+ "version": "2.6.9",
+ "from": "debug@>=2.6.9 <2.7.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "dependencies": {
+ "ms": {
+ "version": "2.0.0",
+ "from": "ms@2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
+ }
+ }
+ }
+ }
+ },
+ "bluebird": {
+ "version": "3.5.5",
+ "from": "bluebird@>=3.5.2 <4.0.0",
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz"
+ },
+ "buffer-more-ints": {
+ "version": "1.0.0",
+ "from": "buffer-more-ints@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/buffer-more-ints/-/buffer-more-ints-1.0.0.tgz"
+ },
+ "readable-stream": {
+ "version": "1.1.14",
+ "from": "readable-stream@>=1.0.0 <2.0.0 >=1.1.9",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "dependencies": {
+ "core-util-is": {
+ "version": "1.0.2",
+ "from": "core-util-is@>=1.0.0 <1.1.0",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz"
+ },
+ "isarray": {
+ "version": "0.0.1",
+ "from": "isarray@0.0.1",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
+ },
+ "string_decoder": {
+ "version": "0.10.31",
+ "from": "string_decoder@>=0.10.0 <0.11.0",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz"
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "from": "inherits@>=2.0.1 <2.1.0",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
+ }
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "from": "safe-buffer@>=5.1.2 <5.2.0",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz"
+ },
+ "url-parse": {
+ "version": "1.4.7",
+ "from": "url-parse@>=1.4.3 <1.5.0",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
+ "dependencies": {
+ "querystringify": {
+ "version": "2.1.1",
+ "from": "querystringify@>=2.1.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz"
+ },
+ "requires-port": {
+ "version": "1.0.0",
+ "from": "requires-port@>=1.0.0 <2.0.0",
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz"
+ }
+ }
+ }
+ }
+ },
"easejs": {
"version": "0.2.9",
- "from": "easejs@>=0.2.0 <0.3.0",
+ "from": "https://registry.npmjs.org/easejs/-/easejs-0.2.9.tgz",
"resolved": "https://registry.npmjs.org/easejs/-/easejs-0.2.9.tgz"
},
"mongodb": {
"version": "1.2.14",
- "from": "mongodb@1.2.14",
+ "from": "https://registry.npmjs.org/mongodb/-/mongodb-1.2.14.tgz",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-1.2.14.tgz",
"dependencies": {
"bson": {
"version": "0.1.8",
- "from": "bson@0.1.8",
+ "from": "https://registry.npmjs.org/bson/-/bson-0.1.8.tgz",
"resolved": "https://registry.npmjs.org/bson/-/bson-0.1.8.tgz"
}
}
diff --git a/package.json.in b/package.json.in
index e2a6b6e..7598a99 100644
--- a/package.json.in
+++ b/package.json.in
@@ -29,6 +29,7 @@
"amqplib": "0.5.3"
},
"devDependencies": {
+ "typescript": ">=3.6",
"chai": ">=1.9.1 < 4",
"chai-as-promised": ">=6.0.0",
"mocha": "5.2.0",
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..089f208
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,20 @@
+{
+ "compilerOptions": {
+ "incremental": true,
+ "inlineSourceMap": true,
+ "lib": [ "es6" ],
+ "module": "commonjs",
+ "noImplicitReturns": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "strict": true,
+ "target": "es5",
+ "baseUrl": ".",
+ "paths": {
+ "*": [
+ "node_modules/*",
+ "src/types/*",
+ ],
+ },
+ }
+}