2017-04-10 17:01:13 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright 2016 Google Inc. All rights reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
pushd "$(dirname $0)" >/dev/null
|
2017-08-11 16:24:36 +00:00
|
|
|
|
|
|
|
npm install @types/flatbuffers
|
|
|
|
|
2017-05-24 22:21:26 +00:00
|
|
|
../flatc --ts --no-fb-import --gen-mutable -o ts -I include_test monster_test.fbs
|
|
|
|
../flatc -b -I include_test monster_test.fbs unicode_test.json
|
2017-05-01 23:05:53 +00:00
|
|
|
tsc --strict --noUnusedParameters --noUnusedLocals --noImplicitReturns --strictNullChecks ts/monster_test_generated.ts
|
2017-04-21 16:29:42 +00:00
|
|
|
node JavaScriptTest ./ts/monster_test_generated
|
2017-08-11 16:24:36 +00:00
|
|
|
|
|
|
|
../flatc --ts --js --no-fb-import -o ts union_vector/union_vector.fbs
|
|
|
|
|
|
|
|
# test JS version first, then transpile and rerun for TS
|
|
|
|
node JavaScriptUnionVectorTest ./ts/union_vector_generated
|
|
|
|
tsc --strict --noUnusedParameters --noUnusedLocals --noImplicitReturns --strictNullChecks ts/union_vector_generated.ts
|
|
|
|
node JavaScriptUnionVectorTest ./ts/union_vector_generated
|
|
|
|
|
|
|
|
npm uninstall @types/flatbuffers
|