<commit_before>APT := $(shell command -v apt 2> /dev/null)
YUM := $(shell command -v yum 2> /dev/null)
NPM += $(shell command -v npm 2> /dev/null)

all: webpack golang

setup_7.x:
	wget https://rpm.nodesource.com/setup_7.x

yum: setup_7.x
ifdef YUM
	sudo bash ./setup_7.x
	sudo yum -y install nodejs
endif

apt:
ifdef APT
	sudo apt install npm
endif

npm: apt yum

node_modules:
# By defining this conditionally, rather than making a 'npm' a
# precondition we can stop node_modules and npm running for every make.
ifndef NPM
	make npm
endif
	npm i webpack babel-core babel-loader babel-preset-es2015 babel-preset-react react react-dom -S

webpack: node_modules
	./node_modules/.bin/webpack -d

golang:
	go build .

golang-test:
	go test -v 

docker-build:
	sudo docker build -t helloxl .

docker-run:
	sudo docker run --publish 8080:3000 --name helloxl --rm helloxl<commit_msg>Add Arch linux / pacman support for build<commit_after>APT := $(shell command -v apt 2> /dev/null)
YUM := $(shell command -v yum 2> /dev/null)
PACMAN := $(shell command -v pacman 2> /dev/null)
NPM += $(shell command -v npm 2> /dev/null)

all: webpack golang

setup_7.x:
	wget https://rpm.nodesource.com/setup_7.x

yum: setup_7.x
ifdef YUM
	sudo bash ./setup_7.x
	sudo yum -y install nodejs
endif

apt:
ifdef APT
	sudo apt install npm
endif

pacman:
ifdef PACMAN
	sudo pacman -S npm
endif

npm: apt yum pacman

node_modules:
# By defining this conditionally, rather than making a 'npm' a
# precondition we can stop node_modules and npm running for every make.
ifndef NPM
	make npm
endif
	npm i webpack babel-core babel-loader babel-preset-es2015 babel-preset-react react react-dom -S

webpack: node_modules
	./node_modules/.bin/webpack -d

golang:
	go build .

golang-test:
	go test -v 

docker-build:
	sudo docker build -t helloxl .

docker-run:
	sudo docker run --publish 8080:3000 --name helloxl --rm helloxl
{'fraction_non_alphanumeric': 0.0996290408055114, 'fraction_numerical': 0.02066772655007949, 'mean_word_length': 3.5167464114832536, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '1228285', 'n_tokens_mistral': 765, 'n_tokens_neox': 688, 'n_words': 251}