8000 Better document (possibly restructure) cljsbuilds · Issue #177 · plexus/chestnut · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jul 2, 2022. It is now read-only.
This repository was archived by the owner on Jul 2, 2022. It is now read-only.
Better document (possibly restructure) cljsbuilds #177
Open
@plexus

Description

@plexus

This came up after some questions on Clojurians Slack, there are some thin 55B2 gs which can be counterintuitive when using cljsbuild directly

  • running lein cljsbuild once blows up

The reason is it tries to compile all three builds (app, test, min), and the test build doesn't have doo.runner available, and so blows up.

This is solvable in the sense that it no longer explodes, just add doo as a dev dependency (and not just a plugin), but in a way it's actually good that lein cjlsbuild once blows up because both "app" and "min" target the same output file, so it's not clear what the result should be.

  • lein cljsbuild once min doesn't work when an app build is already present and vice versa

That is to say, it doesn't overwrite the output file, which it should do, so you end up with a non-optimized file when you want it optimized or vice versa. This is a thorny one because it can be a pain to figure out what's going on.

Possible solutions:

  • add some leiningen hook to remove the target file before compilation
  • use different target names for "app" and "min", this means adding more complexity to switch to the right one, while now we can just serve one index.html for both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0