Skip to content
Permalink
Browse files

+cljs rn

  • Loading branch information...
souenzzo committed Mar 4, 2019
1 parent dd2a3c5 commit 217f4ca775aaf90226c0ce61cd3540524985637d
Showing with 27 additions and 18 deletions.
  1. +1 −1 .gitignore
  2. +1 −4 deps.edn
  3. +3 −3 index.js
  4. +13 −9 shadow-cljs.edn
  5. +2 −1 src/dev/user.clj
  6. +7 −0 src/rn/app_native/rn.cljs
@@ -6,4 +6,4 @@ target/
node_modules/
android/.gradle/
android/app/build/

cljs/
@@ -14,9 +14,6 @@
:aliases {:dev {:extra-paths ["src/dev"]
:extra-deps {fulcrologic/fulcro-inspect {:mvn/version "2.2.5"}
binaryage/devtools {:mvn/version "0.9.10"}}}
:cljs {:extra-paths ["src/web"]
:cljs {:extra-paths ["src/web" "src/rn"]
:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.520"}
thheller/shadow-cljs {:mvn/version "2.8.11"}}}}}



@@ -1,12 +1,12 @@
const {name} = require('./app.json');
const React = require('react');
// const {main} = require('./cljs/app_native.rn.js');
const {Text, AppRegistry} = require('react-native');
const {main} = require('./cljs/app_native.rn.js');
const {AppRegistry} = require('react-native');


class App extends React.Component {
render() {
return React.createElement(Text, {}, "Hello")
return main()
}
}

@@ -1,10 +1,14 @@
{:deps {:aliases [:cljs :dev]}
:builds {:web {:target :browser
:output-dir "target/public/web"
:asset-path "/_static/web"
:modules {:main {:entries [app-client.core]}}
:module-hash-names true
:devtools {:preloads [app-client.user
devtools.preload
fulcro.inspect.preload]
:after-load app-client.user/after-load}}}}
:builds {:web {:target :browser
:output-dir "target/public/web"
:asset-path "/_static/web"
:modules {:main {:entries [app-client.core]}}
:module-hash-names true
:devtools {:preloads [app-client.user
devtools.preload
fulcro.inspect.preload]
:after-load app-client.user/after-load}}
:rn {:target :npm-module
:output-dir "cljs"
:asset-path "/"
:modules {:main {:entries [app-native.rn]}}}}}
@@ -10,4 +10,5 @@
[& _]
(server/run-dev)
(prn [@shadow-server])
(shadow/watch :web))
(shadow/watch :web)
(shadow/watch :rn))
@@ -0,0 +1,7 @@
(ns app-native.rn
(:require ["react-native" :as rn]
["react" :as r]))

(defn main
[]
(r/createElement rn/Text #js {} "Hello from cljs"))

0 comments on commit 217f4ca

Please sign in to comment.
You can’t perform that action at this time.