1# Licensed to the Apache Software Foundation (ASF) under one 2# or more contributor license agreements. See the NOTICE file 3# distributed with this work for additional information 4# regarding copyright ownership. The ASF licenses this file 5# to you under the Apache License, Version 2.0 (the 6# "License"); you may not use this file except in compliance 7# with the License. You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, 12# software distributed under the License is distributed on an 13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14# KIND, either express or implied. See the License for the 15# specific language governing permissions and limitations 16# under the License. 17 18# We call npm twice to work around npm issues 19 20stubs: $(top_srcdir)/test/v0.16/ThriftTest.thrift 21 mkdir -p test-compiled 22 $(THRIFT) --gen js:node,ts -o test/ $(top_srcdir)/test/v0.16/ThriftTest.thrift && $(THRIFT) --gen js:node,ts -o test-compiled $(top_srcdir)/test/v0.16/ThriftTest.thrift 23 $(THRIFT) --gen js:node,ts -o test/ $(top_srcdir)/test/Int64Test.thrift && $(THRIFT) --gen js:node,ts -o test-compiled $(top_srcdir)/test/Int64Test.thrift 24 25ts-compile: stubs 26 mkdir -p test-compiled 27 ../../node_modules/typescript/bin/tsc --outDir test-compiled/ --project test/tsconfig.json 28 29deps: $(top_srcdir)/package.json 30 $(NPM) install $(top_srcdir)/ || $(NPM) install $(top_srcdir)/ 31 32all-local: deps ts-compile 33 34precross: deps stubs ts-compile 35 36check: deps ts-compile 37 cd $(top_srcdir) && $(NPM) run test-ts && cd lib/nodets 38 39clean-local: 40 $(RM) -r test/gen-nodejs 41 $(RM) -r $(top_srcdir)/node_modules 42 $(RM) -r test-compiled 43 44EXTRA_DIST = \ 45 test \ 46 coding_standards.md 47