Makefile 541 B

12345678910111213141516
  1. VERSION=$(shell node --eval "console.log(require('./package.json').version)")
  2. BUNDLE=dist/exif-parser-$(VERSION).js
  3. MIN_BUNDLE=dist/exif-parser-$(VERSION)-min.js
  4. BROWSERIFY=node_modules/.bin/browserify
  5. UGLIFY=node_modules/.bin/uglifyjs
  6. build-browser-bundle: setup
  7. @echo "building $(BUNDLE) ..."
  8. @mkdir -p dist/
  9. @$(BROWSERIFY) --bare browser-global.js -o $(BUNDLE)
  10. @echo "building $(MIN_BUNDLE) ..."
  11. @$(UGLIFY) $(BUNDLE) -o $(MIN_BUNDLE) --compress
  12. setup:
  13. @npm install --no-optional --loglevel error --development
  14. clean:
  15. @rm -rf dist/