GithubHelp home page GithubHelp logo

Comments (5)

bhauman avatar bhauman commented on August 22, 2024

I'm going to check this out this morning.

from devcards.

bhauman avatar bhauman commented on August 22, 2024

I checked out your project and it seems to be working fine for me. Are you on a windows platform?

For me on the index.html page you I see

Figwheel: NOT loading these files 
utils.cljs?rel=1444838725147:38 not required: ("/webkipedia/devcards/search.js" nil)
This is expected.

But on the cards.html page I see things like

Figwheel: loaded these files
utils.cljs?rel=1444838260059:38 ("../webkipedia/devcards/search.js" "../webkipedia/devcards/core.js")
Figwheel: NOT loading these files 
utils.cljs?rel=1444838260059:38 not required: ("/webkipedia/state/logger.js" "/webkipedia/state/route.js" "/webkipedia/state/explore.js" "/webkipedia/api/core.js" "/webkipedia/ui/page_header.js" )

This is also expected.

This is because both builds are watching the same directories.
(It's probably better to put your cards on a separate watch path and then have :source-paths ["src" "cards_src])

From your statements it doesn't seem like this is happening to you and when you are on the cards.html page you are getting these

Figwheel: NOT loading these files 
utils.cljs?rel=1444838725147:38 not required: ("/webkipedia/devcards/search.js" nil) 

messages??
That doesn't seem right.

from devcards.

joakin avatar joakin commented on August 22, 2024

Hmmf, that is weird!

I've run only lein figwheel devcards and now when I update search.cljs (which was originally requested with http://localhost:3449/js/compiled/devcards_out/webkipedia/devcards/search.js get's requested as http://localhost:3449/webkipedia/devcards/search.js?zx=8aryg1wka740 so it gives me a not found:

Figwheel: notified of file changes
jsloader.js:197 GET http://localhost:3449/webkipedia/devcards/search.js?zx=8aryg1wka740
utils.cljs?rel=1444821373948:40 Figwheel: Error loading file webkipedia/devcards/search.js
utils.cljs?rel=1444821373948:39 Figwheel: NOT loading these files 
utils.cljs?rel=1444821373948:41 not required: ("/webkipedia/devcards/search.js")

Not sure why but it's not using the prefix /js/compiled/devcards_outspecified in :asset-path "js/compiled/devcards_out".

Gonna keep digging and see if I figure it out.

The config: https://github.com/joakin/webkipedia/blob/devcards/project.clj#L27-L35

Am I supposed to write the devcards along with my code or separate? I've been looking at the examples and it seems like it would be better to interleave the code with the cards.

I'm going to test using the same :main entry and conditionally loading the app on webkipedia.core instead of putting everything on a different ns/entrypoint.

from devcards.

joakin avatar joakin commented on August 22, 2024

Sorry, I'm on OSX 10.10.3.

This are my steps exactly:

  • Run lein figwheel devcards
public (devcards *$=) $ rlwrap lein figwheel devcards
Figwheel: Starting server at http://localhost:3449
Focusing on build ids: devcards
Compiling "resources/public/js/compiled/webkipedia_devcards.js" from ["src"]...
Successfully compiled "resources/public/js/compiled/webkipedia_devcards.js" in 9.089 seconds.
Started Figwheel autobuilder
WARNING: unable to load "cemerick.piggieback/wrap-cljs-repl" middleware

Launching ClojureScript REPL for build: devcards
Figwheel Controls:
          (stop-autobuild)                ;; stops Figwheel autobuilder
          (start-autobuild [id ...])      ;; starts autobuilder focused on optional ids
          (switch-to-build id ...)        ;; switches autobuilder to different build
          (reset-autobuild)               ;; stops, cleans, and starts autobuilder
          (reload-config)                 ;; reloads build config and resets autobuild
          (build-once [id ...])           ;; builds source one time
          (clean-builds [id ..])          ;; deletes compiled cljs target files
          (fig-status)                    ;; displays current state of system
          (add-dep [org.om/om "0.8.1"]) ;; add a dependency. very experimental
  Switch REPL build focus:
          :cljs/quit                      ;; allows you to switch REPL to another build
    Docs: (doc function-name-here)
    Exit: Control+C or :cljs/quit
 Results: Stored in vars *1, *2, *3, *e holds last exception object
Prompt will show when figwheel connects to your application
To quit, type: :cljs/quit
cljs.user=>
Navigated to http://localhost:3449/cards.html
react-with-addons.inc.js:4486 Download the React DevTools for a better development experience: https://fb.me/react-devtools
utils.cljs?rel=1444821373948:39 Figwheel: trying to open cljs reload socket
utils.cljs?rel=1444821373948:39 Figwheel: socket connection established
react-with-addons.inc.js:21628 Warning: Each child in an array or iterator should have a unique "key" prop. Check the React.render call using <div>. See https://fb.me/react-warning-keys for more information.
  • Edit src/webkipedia/devcards/search.cljs changing the markdown string.
  • Nothing changes on the browser. Open console and see:
utils.cljs?rel=1444821373948:39 Figwheel: notified of file changes
jsloader.js:197 GET http://localhost:3449/webkipedia/devcards/search.js?zx=q3qw6l88rb3 
utils.cljs?rel=1444821373948:40 Figwheel: Error loading file webkipedia/devcards/search.js
utils.cljs?rel=1444821373948:39 Figwheel: NOT loading these files 
utils.cljs?rel=1444821373948:41 not required: ("/webkipedia/devcards/search.js")

I see a warning when starting figwheel that I didn't notice about piggieback. I don't think it has anything to do but I'll get that fixed.

from devcards.

joakin avatar joakin commented on August 22, 2024

I've finally made a lein clean and now everything works fine... 😞

It's always a lein clean, noob mistake. Sorry to waste your time.

Do you have any thoughts (written somewhere maybe?) about where to put cards? Along with the code base? Separate?

Sorry again for the waste of time :(, and thanks again for the plugins, looking forward to developing with devcards!

from devcards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.