Comments (5)
I don't think I understand your situation completely.
But if you are working on a separate project in iframe, it is certainly possible.
You can change the :output-to
and the :output-dir
to anything path is in the resources
directory.
Not sure if this helps.
from lein-figwheel.
I will try to clarify it.
My output-to looks like :output-to "build/extension/js/example.js"
. Right now it's required that my files go under resources/public. Or I get the Figwheel Config Error - your build :output-dir is not below the 'resources/public' directory.
error.
I guess this is because when I run lein figwheel
it starts a static file server and tries to serve my webpage. Is this part necessary? Because my page will be inside a browser extension that is manually added to the browser. I just need the part of figwheel that accepts the connection from the page and pushes recompiled changes back on save.
Is it possible to run it like this without the static serving part? Ideally I would like to have more build targets in my project.clj file and every one of them connecting to one independent figwheel server.
Maybe I just misunderstood how figwheel works, because I didn't have time to take a closer look at the code.
from lein-figwheel.
Yep, figwheel doesn't push the changed code, it only pushes the paths of the changed files and then the browser reloads them.
This is an interesting use case. I always assumed that the browser would have to load the files from a server. I also assumed that if I pushed and evalled the code that the connection would be much less stable. The browsers file loading mechanism is pretty bomb proof compared to trying to catch exceptions across an eval. Eval however makes you code indifferent to paths which is a nice thing.
Gonna think on this.
On May 16, 2014, at 3:07 AM, Bernard Kolobara [email protected] wrote:
I will try to clarify it.
My output-to looks like :output-to "build/extension/js/example.js". Right now it's required that my files go under resources/public. Or I get the Figwheel Config Error - your build :output-dir is not below the 'resources/public' directory. error.I guess this is because when I run lein figwheel it starts a static file server and tries to serve my webpage. Is this part necessary? Because my page will be inside a browser extension that is manually added to the browser. I just need the part of figwheel that accepts the connection from the page and pushes recompiled changes back on save.
Is it possible to run it like this without the static serving part? Ideally I would like to have more build targets in my project.clj file and every one of them connecting to one independent figwheel server.
Maybe I just misunderstood how figwheel works, because I didn't have time to take a closer look at the code.
—
Reply to this email directly or view it on GitHub.
from lein-figwheel.
I just made a change that may make figwheel work for you.
I also modified the client so that it defaults to loading files from the host of the :websocket-url so this may make things work automatically if you are connected to the websocket server.
I also added a :url-rewriter
option that takes a function which will be passed the full asset request url of javascript files and css files. You can modify the request url to point anywhere you want now.
Hope this helps.
from lein-figwheel.
Thank you. This is amazing!
from lein-figwheel.
Related Issues (20)
- scss reloading not being triggered HOT 2
- Why is it named figwheel? HOT 1
- Buffers won't connect to CIDER/Figwheel REPL HOT 1
- Figwheel fails to recognize Java version - issues bad warning HOT 5
- Update REPL integration wiki documentation
- Code reloading fails if you use goog namespace
- Separate builds should truly be separate
- Hello world template opens REPL and detects changes but does not run HOT 1
- Erroneous java version warning HOT 1
- REPL and line splitting mid-form HOT 2
- Confusing project.clj syntax error
- How to create production build? HOT 1
- Unable to change Figwheel server-port HOT 1
- Support non-boolean values for :output-wrapper compiler option
- Uncaught ReferenceError: on_js_reload is not defined
- websocket connection-url should default to window.location.hostname instead of localhost HOT 1
- unable to change websocket-host to window.location.host HOT 1
- Can get the nrepl session establshed HOT 1
- On a brand new project `lein figwheel` -> `java.lang.NullPointerException`
- Running lein figwheel throws java.lang.NullPointerException: Cannot invoke "clojure.lang.IFn.invoke(Object)" because "loc" is null HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lein-figwheel.