Izzimach / om-react-pixi

Bindings for om to let you control pixi sprites from clojurescript.
Other
30 stars 2 forks source link

Can I use this as a dependency? #1

Closed claybridges closed 9 years ago

claybridges commented 9 years ago

Like this:

(defproject nut "0.1.0-SNAPSHOT"

  ; ... stuff ....
  :dependencies [[org.clojure/clojure "1.6.0"]
                 [org.clojure/clojurescript "0.0-2371" :scope "provided"]
                 ; ... stuff ...
                 [org.clojars.haussman/om-react-pixi "0.1.0-SNAPSHOT"]]

Apologies if this is a newbie and/or conceptually-flawed question. I'm trying to learn by fighting outside my weight range.

Izzimach commented 9 years ago

You totally should be able to do that. However, I haven't yet deployed a package to clojars yet. I still need to pack up react-pixi (and possibly pixi) and then have om-react-pixi depend on those packages. I've gotten react-pixi onto bower and was looking into deploying it to clojars next. After that I can update and deploy om-react-pixi.

You can try it out right now by copying files over, but it's a royal mess. I would recommend messing with one of the examples instead.

If you're a brave soul, you would need to copy over:

Then add "src/omreactpixi" to the source path of your cljsbuild settings:

                       {:id "cupcake"
                        :source-paths ["src/omreactpixi" "src/examples/cupcake"]
                        :compiler {
                                   :output-to "examples/cupcake/out/cupcake.js"
                                   :output-dir "examples/cupcake/out"
                                   :optimizations :none
                                   :source-map true}}

Also react-pixi.js and pixi.dev.js have to be included in your html somewhere:

        <script src="../../vendor/pixi.dev.js"></script>
        <script src="../../vendor/react-pixi.js"></script>
Izzimach commented 9 years ago

I'll open an 'official' issue for others who probably have the same question.

claybridges commented 9 years ago

Well done, thanks. For lack of a superior channel to relay this, I like where you are headed with all this stuff. :+1:.