on master help sign in
Merge remote-tracking branch 'origin/ts-skip-closure-compiler' into je-dynRouteLink

# Conflicts: # skeleton/default.nix

commit02339402ea2102ed0f2538c1a27ddca01a448c4e authorDan Bornside <dan.bornside@obsidian.systems> dateMon 27 May 2019, 22:09 (7 years ago) parentde99fc667addbb
2 files changed+16−11
default.nix+8−4 skeleton/default.nix+8−7
default.nix+8−4
@@ -164,12 +164,16 @@ in rec {
164164 obelisk-asset-manifest-generate "$src" "$haskellManifest" ${packageName} ${moduleName} "$symlinked"
165165 '';
166166
167− compressedJs = frontend: optimizationLevel: pkgs.runCommand "compressedJs" { buildInputs = [ pkgs.closurecompiler ]; } ''
167+ compressedJs = frontend: optimizationLevel: pkgs.runCommand "compressedJs" {} ''
168168 mkdir $out
169169 cd $out
170170 ln -s "${haskellLib.justStaticExecutables frontend}/bin/frontend.jsexe/all.js" all.unminified.js
171− closure-compiler --externs "${reflex-platform.ghcjsExternsJs}" -O ${optimizationLevel} --jscomp_warning=checkVars --create_source_map="all.js.map" --source_map_format=V3 --js_output_file="all.js" all.unminified.js
172− echo "//# sourceMappingURL=all.js.map" >> all.js
171+ ${if optimizationLevel == null then ''
172+ ln -s all.unminified.js all.js
173+ '' else ''
174+ ${pkgs.closurecompiler}/bin/closure-compiler --externs "${reflex-platform.ghcjsExternsJs}" -O ${optimizationLevel} --jscomp_warning=checkVars --create_source_map="all.js.map" --source_map_format=V3 --js_output_file="all.js" all.unminified.js
175+ echo "//# sourceMappingURL=all.js.map" >> all.js
176+ ''}
173177 '';
174178
175179 serverModules = {
@@ -275,7 +279,7 @@ in rec {
275279 , tools ? _: []
276280 , shellToolOverrides ? _: _: {}
277281 , withHoogle ? false # Setting this to `true` makes shell reloading far slower
278− , __closureCompilerOptimizationLevel ? "ADVANCED"
282+ , __closureCompilerOptimizationLevel ? "ADVANCED" # Set this to `null` to skip the closure-compiler step
279283 }:
280284 let frontendName = "frontend";
281285 backendName = "backend";
skeleton/default.nix+8−7
@@ -1,10 +1,11 @@
11{ obelisk ? import ./.obelisk/impl {
2− system = builtins.currentSystem;
3− iosSdkVersion = "10.2";
4− # You must accept the Android Software Development Kit License Agreement at
5− # https://developer.android.com/studio/terms in order to build Android apps.
6− # Uncomment and set this to `true` to indicate your acceptance:
7− # config.android_sdk.accept_license = false;
2+ system = builtins.currentSystem;
3+ iosSdkVersion = "10.2";
4+ # You must accept the Android Software Development Kit License Agreement at
5+ # https://developer.android.com/studio/terms in order to build Android apps.
6+ # Uncomment and set this to `true` to indicate your acceptance:
7+ # config.android_sdk.accept_license = false;
8+ projectOverrides = {};
89 }
910}:
1011with obelisk;
@@ -13,4 +14,4 @@ project ./. ({ ... }: {
1314 android.displayName = "Obelisk Minimal Example";
1415 ios.bundleIdentifier = "systems.obsidian.obelisk.examples.minimal";
1516 ios.bundleName = "Obelisk Minimal Example";
16−})
17+} // projectOverrides)