File tree 3 files changed +31
-4
lines changed
3 files changed +31
-4
lines changed Original file line number Diff line number Diff line change
1
+ GOOGLE_CLIENT_ID=""
2
+ GOOGLE_CLIENT_SECRET=""
3
+ GOOGLE_API_KEY=""
4
+ GOOGLE_SERVER_API_KEY=""
5
+ GOOGLE_APP_ID=""
6
+ BASE_URL="."
7
+ CURRENT_PYRET_RELEASE=""
8
+ PYRET="./js/cpo-main.jarr.js"
9
+ POSTMESSAGE_ORIGIN="*"
10
+ SHARED_FETCH_SERVER="https://code.pyret.org"
11
+ URL_FILE_MODE="all-remote"
12
+ IMAGE_PROXY_BYPASS="true"
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ selenium-test-local:
36
36
selenium-test-sauce :
37
37
TEST_LOC=" sauce" node test/test.js test/browser/pyret
38
38
39
+ build/web/editor.embed.html : src/web/editor.html .env.embed
40
+ node make-template.js $< .env.embed > $@
41
+ build/web/editor.html : src/web/editor.html
42
+ cp $< $@
43
+
39
44
OUT_HTML := $(patsubst src/web/% .template.html,build/web/views/% .html,$(wildcard src/web/* .template.html) )
40
45
41
46
build/web/views/% .html : src/web/% .template.html
@@ -336,9 +341,9 @@ $(WEBIMG):
336
341
$(WEBARR ) :
337
342
@$(call MKDIR,$(WEBARR ) )
338
343
339
- web-local : $(WEB ) $(WEBV ) $(WEBJS ) $(WEBJSGOOG ) $(WEBCSS ) $(WEBTHEMES ) $(WEBFONTS ) $(WEBIMG ) $(WEBIMAGES ) $(WEBARR ) $(OUT_HTML ) $(COPY_HTML ) $(OUT_CSS ) $(COPY_CSS ) $(COPY_LIB_CSS ) $(COPY_THEMES ) $(COPY_FONTS ) $(COPY_JS ) $(COPY_LIB_JS ) $(COPY_LIB_IMAGES ) $(COPY_ARR ) $(COPY_GIF ) $(COPY_SVG ) $(COPY_PNG ) $(MISC_JS ) $(MISC_CSS ) $(MISC_IMG ) $(COPY_NEW_CSS ) $(COPY_NEW_JS ) $(COPY_GOOGLE_JS ) $(CPOMAIN ) $(CPOGZ ) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml
344
+ web-local : build/web/editor.html build/web/editor.embed.html $(WEB ) $(WEBV ) $(WEBJS ) $(WEBJSGOOG ) $(WEBCSS ) $(WEBTHEMES ) $(WEBFONTS ) $(WEBIMG ) $(WEBIMAGES ) $(WEBARR ) $(OUT_HTML ) $(COPY_HTML ) $(OUT_CSS ) $(COPY_CSS ) $(COPY_LIB_CSS ) $(COPY_THEMES ) $(COPY_FONTS ) $(COPY_JS ) $(COPY_LIB_JS ) $(COPY_LIB_IMAGES ) $(COPY_ARR ) $(COPY_GIF ) $(COPY_SVG ) $(COPY_PNG ) $(MISC_JS ) $(MISC_CSS ) $(MISC_IMG ) $(COPY_NEW_CSS ) $(COPY_NEW_JS ) $(COPY_GOOGLE_JS ) $(CPOMAIN ) $(CPOGZ ) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml
340
345
341
- web : $(WEB ) $(WEBV ) $(WEBJS ) $(WEBJSGOOG ) $(WEBCSS ) $(WEBTHEMES ) $(WEBFONTS ) $(WEBIMG ) $(WEBIMAGES ) $(WEBARR ) $(OUT_HTML ) $(COPY_HTML ) $(OUT_CSS ) $(COPY_CSS ) $(COPY_LIB_CSS ) $(COPY_THEMES ) $(COPY_FONTS ) $(COPY_JS ) $(COPY_LIB_JS ) $(COPY_LIB_IMAGES ) $(COPY_ARR ) $(COPY_GIF ) $(COPY_SVG ) $(COPY_PNG ) $(MISC_JS ) $(MISC_CSS ) $(MISC_IMG ) $(COPY_NEW_CSS ) $(COPY_NEW_JS ) $(COPY_GOOGLE_JS ) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml
346
+ web : build/web/editor.html build/web/editor.embed.html $(WEB ) $(WEBV ) $(WEBJS ) $(WEBJSGOOG ) $(WEBCSS ) $(WEBTHEMES ) $(WEBFONTS ) $(WEBIMG ) $(WEBIMAGES ) $(WEBARR ) $(OUT_HTML ) $(COPY_HTML ) $(OUT_CSS ) $(COPY_CSS ) $(COPY_LIB_CSS ) $(COPY_THEMES ) $(COPY_FONTS ) $(COPY_JS ) $(COPY_LIB_JS ) $(COPY_LIB_IMAGES ) $(COPY_ARR ) $(COPY_GIF ) $(COPY_SVG ) $(COPY_PNG ) $(MISC_JS ) $(MISC_CSS ) $(MISC_IMG ) $(COPY_NEW_CSS ) $(COPY_NEW_JS ) $(COPY_GOOGLE_JS ) build/web/js/editor-misc.min.js build/web/js/snap build/web/js/transpile.xml
342
347
343
348
link-pyret :
344
349
ln -s node_modules/pyret-lang pyret
Original file line number Diff line number Diff line change @@ -2,9 +2,19 @@ var mustache = require('mustache');
2
2
var file = require ( 'fs' ) ;
3
3
// Silent suppresses "missing .env file" warning,
4
4
// which we want since deploys don't have that file
5
- require ( 'dotenv' ) . config ( { silent : true } ) ;
5
+ var dotenv = require ( 'dotenv' ) ;
6
6
7
- var config = process . env ;
7
+ dotenv . config ( { silent : true } ) ;
8
+
9
+ const replacementConfig = process . argv [ 3 ] ;
10
+ let config ;
11
+ if ( replacementConfig !== undefined ) {
12
+ const buf = Buffer . from ( file . readFileSync ( process . argv [ 3 ] ) ) ;
13
+ config = dotenv . parse ( buf )
14
+ }
15
+ else {
16
+ config = process . env ;
17
+ }
8
18
9
19
var fileIn = process . argv [ 2 ] ;
10
20
var fileContents = String ( file . readFileSync ( fileIn ) ) ;
You can’t perform that action at this time.
0 commit comments