Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

b4w can only work with cljs :optimizations set to :none #2

Open
mikebelanger opened this issue Oct 11, 2016 · 1 comment
Open

b4w can only work with cljs :optimizations set to :none #2

mikebelanger opened this issue Oct 11, 2016 · 1 comment

Comments

@mikebelanger
Copy link
Owner

blend4web does have a white-space-only optimized js file, as well as an advanced one. They're currently just sitting in the packages common/ directory.

Unfortunately, I cannot get those two other optimizations to compile. Because I'm using blend4web's externs.js, I assumed this optimization would work.

It's likely the case that boot has to be pointed to a different js file in the packages common/ directory -- depending on the optimization setting. But I want to work on some other stuff right now, and not forget this issue.

@mikebelanger mikebelanger changed the title :optimizations can only handle :simple b4w can only work with cljs :optimizations set to :simple Oct 11, 2016
@mikebelanger mikebelanger changed the title b4w can only work with cljs :optimizations set to :simple b4w can only work with cljs :optimizations set to :none Oct 24, 2016
@mikebelanger
Copy link
Owner Author

I wanted to use cljs-repl, which requires I set the optimization setting to :none. Normally, I would use the unoptimized b4w.js as well, but b4w.js is just an entry point for all of its modules, which sit in different files and get loaded in via CommonJS. That said, Boot looks for b4w.inc.js in its fileset when it compiles unoptimized, and complains if it isn't there.

As a workaround, this package now sifts the minified b4w.min.js into `b4w.inc.js instead, and so in effect, we're only using the advanced compilation mode b4w with our unoptimized clojure code :P

I believe a .edn is needed to point boot to different js files depending on the optimization setting, although its manual doesn't make that particularly clear. However, this tutorial gets at this, so I'll have to check this out next : https://adambard.com/blog/clojurescript-boot-fireplace/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant