diff options
author | Joas Schilling <coding@schilljs.com> | 2020-09-09 17:37:01 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-09-10 10:41:33 +0300 |
commit | 095c376166604fdc9a99db1083a3fa421810f0cd (patch) | |
tree | 015a1cbaeff71b3e90c85f0e736af096cc903f79 /Makefile | |
parent | 5024328a13a11a6d751888ab24f33a14c663777d (diff) |
"App tutorial"ize this app
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -4,11 +4,27 @@ project_dir=$(CURDIR)/../$(app_name) build_dir=$(CURDIR)/build source_dir=$(build_dir)/$(app_name) sign_dir=$(build_dir)/sign +composer=$(shell which composer 2> /dev/null) all: dev-setup build-js-production dev-setup: clean clean-dev npm-init +# Installs and updates the composer dependencies. If composer is not installed +# a copy is fetched from the web +composer: +ifeq (, $(composer)) + @echo "No composer command available, downloading a copy from the web" + mkdir -p $(build_tools_directory) + curl -sS https://getcomposer.org/installer | php + mv composer.phar $(build_tools_directory) + php $(build_tools_directory)/composer.phar install --prefer-dist + php $(build_tools_directory)/composer.phar update --prefer-dist +else + composer install --prefer-dist + composer update --prefer-dist +endif + npm-init: npm install |