Description
Environment
Attachments
- 0005-Update-samples-to-new-none-opt-usage.patch03 Dec 2014, 09:22 AM
- 0004-Emit-all-deps-into-a-single-file.patch03 Dec 2014, 09:22 AM
- 0003-Emit-goog.base-into-deps-file.patch03 Dec 2014, 09:22 AM
- 0002-Emit-goog.base-configuration-constants.patch03 Dec 2014, 09:22 AM
- 03 Dec 2014, 09:22 AM
Activity
David Nolen January 25, 2015 at 5:44 AM
Andrew, I went ahead and tackled this one.
David Nolen January 25, 2015 at 5:43 AM
andrewhr January 25, 2015 at 5:24 AM
Thanks @dnolen for the feedback. I will work on this patch.
David Nolen January 25, 2015 at 3:25 AM
The approaches taken thus far are unnecessarily complex. All that needs to happen is for the generated :none script to document.write the needed scripts and goog.require the :main namespace. I will take a patch that does this.
Thomas Heller December 3, 2014 at 7:20 PM
No :main might as well behave like it does now, this way the feature is completely optional and will not break any existing code. Thats usually worth something, don't know how much because as I said, :main is mandatory in shadow-build.
ClojureScript itself should probably be more conservative than that. I imagine there are alot of projects that still use /out/goog/base.js + other in their HTML, that won't change over night.
If :main namespace supplied - under
:noneoptimization settings:output-tofile shouldgoog.requireit. This would also allow script inclusion to be unified regardless of the level of optimization supplied, i.e.:<script type="text/javascript" src="foo.js"></script>Instead of
<script type="text/javascript" src="out/goog/base.js"></script> <script type="text/javascript" src="foo.js"></script> <script type="text/javascript">goog.require("foo.core");</script>