<commit_before># Makefile for building the project

app_name=mail
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
appstore_dir=$(build_dir)/appstore
source_dir=$(build_dir)/source
package_name=$(app_name)

all: appstore

clean:
	rm -rf $(build_dir)
	rm -rf node_modules
	rm -rf js/vendor

composer.phar:
	curl -sS https://getcomposer.org/installer | php

install-deps: install-composer-deps install-npm-deps install-bower-deps

install-composer-deps: composer.phar
	php composer.phar install

install-npm-deps: package.json
	npm install --production

install-bower-deps: bower.json install-npm-deps
	./node_modules/bower/bin/bower install

optimize-js: install-deps
	./node_modules/requirejs/bin/r.js -o build.js

update-composer:
	rm -f composer.lock
	git rm -r vendor
	composer install --prefer-dist

appstore: clean install-deps optimize-js
	mkdir -p $(appstore_dir)
	tar cvzf $(appstore_dir)/$(package_name).tar.gz $(project_dir) \
	--exclude-vcs \
	--exclude=$(project_dir)/build \
	--exclude=$(project_dir)/build/artifacts \
	--exclude=$(project_dir)/node_modules \
	--exclude=$(project_dir)/.bowerrc \
	--exclude=$(project_dir)/.jscsrc \
	--exclude=$(project_dir)/.jshintrc \
	--exclude=$(project_dir)/.jshintignore \
	--exclude=$(project_dir)/.travis.yml \<commit_msg>use Makefile to set up dev environment<commit_after># Makefile for building the project

app_name=mail
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
appstore_dir=$(build_dir)/appstore
source_dir=$(build_dir)/source
package_name=$(app_name)

all: appstore

clean:
	rm -rf $(build_dir)
	rm -rf node_modules
	rm -rf js/vendor

composer.phar:
	curl -sS https://getcomposer.org/installer | php

install-deps: install-composer-deps install-npm-deps install-bower-deps

install-composer-deps: composer.phar
	php composer.phar install

install-npm-deps:
	npm install --production

install-npm-deps-dev:
	npm install --deps

install-bower-deps: bower.json install-npm-deps
	./node_modules/bower/bin/bower install

optimize-js: install-deps
	./node_modules/requirejs/bin/r.js -o build.js

dev-setup: install-composer-deps install-npm-deps-dev install-bower-deps

update-composer:
	rm -f composer.lock
	git rm -r vendor
	composer install --prefer-dist

appstore: clean install-deps optimize-js
	mkdir -p $(appstore_dir)
	tar cvzf $(appstore_dir)/$(package_name).tar.gz $(project_dir) \
	--exclude-vcs \
	--exclude=$(project_dir)/build \
	--exclude=$(project_dir)/build/artifacts \
	--exclude=$(project_dir)/node_modules \
	--exclude=$(project_dir)/.bowerrc \
	--exclude=$(project_dir)/.jscsrc \
	--exclude=$(project_dir)/.jshintrc \
	--exclude=$(project_dir)/.jshintignore \
	--exclude=$(project_dir)/.travis.yml \
{'fraction_non_alphanumeric': 0.15012815818381545, 'fraction_numerical': 0.0, 'mean_word_length': 4.40990099009901, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1703108', 'n_tokens_mistral': 1040, 'n_tokens_neox': 1001, 'n_words': 181}