typescript_tools 10.1.79

Tools for working with TypeScript monorepos
Documentation
# This is a generated file, do not edit this file directly.
# This file is managed by the typescript-tools, see
# https://github.com/typescript-tools/ for more information.

{% if monorepo_kind == "lerna" %}
LERNA = ./node_modules/.bin/lerna
{%- endif %}
MONOREPO = ./node_modules/.bin/monorepo

MAKEDEPEND = $(MONOREPO) make-depend \
	--root {{ root }} \
	--package-directory {{ package_directory }} \
	--output-file {{ output_file }}{% if create_pack_target %} \
	--create-pack-target{% endif %}

{{ unscoped_package_name.replace("-", "_").to_uppercase() }}_INTERNAL_DEPENDENCY_MANIFESTS_INCLUSIVE = {{ internal_dependency_package_json_filenames_inclusive.join(" \\\n") }}

{{ package_directory }}/node_modules: $(MONOREPO) $({{ unscoped_package_name.replace("-", "_").to_uppercase() }}_INTERNAL_DEPENDENCY_MANIFESTS_INCLUSIVE)
	@$(MAKEDEPEND)
	{%- if monorepo_kind == "lerna" %}
	$(LERNA) bootstrap --scope={{ scoped_package_name }} --include-dependencies
	{%- else if monorepo_kind == "workspace" %}
	npm install --workspace {{ package_directory }}
	{%- endif %}
	@touch $@

$({{ unscoped_package_name.replace("-", "_").to_uppercase() }}_INTERNAL_DEPENDENCY_MANIFESTS_INCLUSIVE):

{% if create_pack_target %}
# Ideally we specify prerequisites to this target so we can rebuild it when appropriate.
# However, we don't have that list of prerequisites handly because we don't supply it for
# the rule to compile our TypeScript code. Instead, we invoke the TypeScript compiler in
# a .PHONY target and let the compiler's built-in logic determine whether or not to
# re-compile its input sources. Since we don't have the list of sources available here,
# let's invoke pack only when the file does not exist.

{{ unscoped_package_name.replace("-", "_").to_uppercase() }}_INTERNAL_NPM_DEPENDENCIES_EXCLUSIVE = {{ internal_npm_dependencies_exclusive.join(" \\\n") }}

{{ package_directory }}/.internal-npm-dependencies:
	mkdir $@

{% for (target, source) in npm_pack_archive_dependencies.iter() %}
{{ target }}: | {{ package_directory }}/.internal-npm-dependencies
	cd {{ package_directory }}/.internal-npm-dependencies; npm pack {{ source }}
{% endfor %}

.PHONY: {{ unscoped_package_name }}-docker-dependencies
{{ unscoped_package_name }}-docker-dependencies: $({{ unscoped_package_name.replace("-", "_").to_uppercase() }}_INTERNAL_NPM_DEPENDENCIES_EXCLUSIVE) | {{ package_directory }}/.internal-npm-dependencies
{% endif %}