From: Carl Worth <cworth@cworth.org>
Date: Tue, 26 May 2020 00:50:54 +0000 (-0700)
Subject: Makefile: Change permissions on generated .js files to be read-only
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=2edf8be08dc797d15cbbed5a3df0b416d26bf1fe;p=lmno.games

Makefile: Change permissions on generated .js files to be read-only

This is a hint to the developer that they shouldn't be eidting these
files, (but instead, should be editing the corresponding .jsx file).
---

diff --git a/Makefile b/Makefile
index cf1e1d7..2652973 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,7 @@ react-dom.js: deps/react-dom.production.min.js
 export BABEL_ENV=production
 %.js: %.jsx
 	$(call quiet,BABEL) $^ --out-file $@
+	@chmod a-w $@
 else
 react.js: deps/react.development.js
 	$(call quiet,CP) $^ $@
@@ -51,6 +52,7 @@ react-dom.js: deps/react-dom.development.js
 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