export BABEL_ENV=production
%.js: %.jsx
$(call quiet,BABEL) $^ --out-file $@
- @chmod a-w $@
else
react.js: deps/react.development.js
$(call quiet,CP) $^ $@
export BABEL_ENV=development
%.js: %.jsx
$(call quiet,BABEL) $^ --out-file $@
- @chmod a-w $@
endif
# The user has not set any verbosity, default to quiet mode and inform the
$(call quiet,SHA512) deps/*.sha512
DOWNLOAD=wget $(WGET_VERBOSE_FLAGS) -nc -P deps
-deps/%.js:
- $(call quiet,DOWNLOAD) https://unpkg.com/react@16/umd/$@
- $(call quiet,SHA512) $(patsubst %,%.sha512,$@)
+deps/react.%.js:
+ $(call quiet,DOWNLOAD) https://unpkg.com/react@16/umd/$(@:deps/%=%)
+ $(call quiet,SHA512) $(@:%=%.sha512)
+
+deps/react-dom.%.js:
+ $(call quiet,DOWNLOAD) https://unpkg.com/react-dom@16/umd/$(@:deps/%=%)
+ $(call quiet,SHA512) $(@:%=%.sha512)
deploy:
rm -rf .deploy-source