1
0
Fork 0

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.
master
Mike Gerwitz 2019-09-04 16:01:08 -04:00
parent 4f8aa3c90b
commit bacefb0752
7 changed files with 125 additions and 7 deletions

4
.gitignore vendored
View File

@ -22,3 +22,7 @@ src/**/index.js
# npm
node_modules
# typescript
tsconfig.tsbuildinfo

View File

@ -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 \

View File

@ -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
```

1
dummy.ts 100644
View File

@ -0,0 +1 @@
/** temporary file to prevent ts build from failing beacuse it can't find files **/

93
npm-shrinkwrap.json generated
View File

@ -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"
}
}

View File

@ -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",

20
tsconfig.json 100644
View File

@ -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/*",
],
},
}
}