mighty-webcamjs
Version:
HTML5 Webcam Image Capture Library with Flash Fallback
45 lines (37 loc) • 1.56 kB
Plain Text
BABEL := "./node_modules/.bin/babel"
.PHONY: watch
watch:
rm -rf dist/*
$(BABEL) ./**/*.js ./*.js --watch --ignore ./node_modules --ignore ./dist --plugins=version-inline --out-dir ./dist/ --presets=react,es2015,stage-0
.PHONY: build
build:
rm -rf dist/*
$(BABEL) ./**/*.js ./*.js --ignore ./node_modules --ignore ./dist --plugins=version-inline --out-dir ./dist/ --presets=react,es2015,stage-0
.PHONY: build-browserify
build-browserify:
browserify ./webcam.js -o ./webcam.dist.js -t [ babelify --presets [ react es2015 stage-0 ] --plugins [ version-inline ] ] -s Webcam
.PHONY: install
install:
yarn install --no-lockfile --no-progress
.PHONY: reinstall
reinstall:
rm yarn.lock || true
rm src/sf/yarn.lock || true
rm -rf ./node_modules
yarn install --no-lockfile
.PHONY: inject-to-stepup
inject-to-stepup:
mkdir ../stepup-syf/frontend/src/mighty-webcamjs || true
echo {\"main\": \"./webcam.js\"} > ../stepup-syf/frontend/src/mighty-webcamjs/package.json
$(BABEL) ./**/*.js ./*.js --watch --ignore ./node_modules --plugins=version-inline --out-dir ../stepup-syf/frontend/src/mighty-webcamjs --presets=react,es2015,stage-0
.PHONY: help
help:
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-30s %s\n" $$help_command $$help_info ; \
done