I too use a static index.html file.

I currently use ring to serve my files during development (by only adding
the code to the source path in the :dev profile). This development server
uses enlive to dynamically modify the html before serving. Works quite well.

My production profile then excludes the development code directory and
compiles with advanced optimisations.

I am considering using two index.html files since its much more
lightweight, but I don't really want to maintain two versions, so I may
stick with what I have.
Another option would be generate the correct version in some way (either
through some clojure program or script, a leiningen plugin or some sort of
preprocessor).
On 28 Jul 2014 19:52, "Udayakumar Rayala" <[email protected]> wrote:

> Hi,
>
> I am working on a Clojurescript app which does not have a server instead
> everything is done in Clojurescript. The html & generated javascript files
> are then served from S3 as a static website.
>
> Locally, I want to use figwheel for development which requires to compile
> code with optimisation :none. But on the production server (S3), I want to
> compile with advanced mode so the generated js file is small.
>
> With optimisation :none, script includes in my html file looks like this,
>
> <script src="javascript/goog/base.js" type="text/javascript"></script>
> <script src="javascript/main.js" type="text/javascript"></script>
> <script>
>   goog.require("example.core");
> </script>
>
> With optimisation :advanced, script includes in my html file looks like
> this,
>
> <script src="javascript/main.js" type="text/javascript"></script>
>
> Since my html files are static, I cannt change the script tags based on
> the environment.
>
> My solution right now, is to have two html files index.html for production
> and dev.html for local development.
>
> How are other getting around this? Are there better ways to deal with this?
>
> Thanks,
> Uday.
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to