[ClojureScript] Re: How can I import this foreign lib.

2015-10-30 Thread Thomas Heller
This is very likely to break :advanced optimisations, did you test that yet?

Probably not what you are looking for but there is a "goog.ui.Textarea" [1,2] 
in the closure library which does the auto-sizing as well. Should be pretty 
straighforward to make a react-wrapper for it.

HTH,
/thomas

[1] 
https://github.com/google/closure-library/blob/master/closure/goog/ui/textarea.js
[2] 
https://google.github.io/closure-library/source/closure/goog/demos/textarea.html

On Friday, October 30, 2015 at 12:51:22 AM UTC+1, Leon Grapenthin wrote:
> I solved this by compiling the library to UMD using webpack.  Also, babel is 
> required as a loader to compile ES6 and JS6.
> 
> It might be worthwhile to write a beginners guide about how to deal with the 
> Javascript module world for people who never used JS as their first language. 
>  I'd do it myself but lack expertise. 
> 
> In any case, here is the webpack configuration file I wrote to get the above 
> package to compile so that it can be included via :module-type :commonjs - 
> Your input is very welcome.
> 
> module.exports = {
> entry: "./src/TextareaAutosize.js",
> module: {
> loaders: [
> {
> test: /\.js$/,
> loader: "babel?stage=0"
> }],
> },
> output: {
> path: __dirname + "/dist",
> filename: "result.js",
> libraryTarget: "umd",
> library: "TextareaAutosize"
> },
> externals: {
> "react": {root: "React"}
> }
> }

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: How can I import this foreign lib.

2015-10-30 Thread Leon Grapenthin
Thanks Thomas for the link regarding the textarea, I might want to try that.

However I'd be very interested to learn why I should expect that this breaks 
advanced optimization (luckily it doesn't).

What is your recommended pipeline? I. e. what module-type should I 
comp/transpile foreign libs to before adding them to ClojureScript. It seems 
that webpack is very flexible in that regard so all I'd have to know is what is 
best for ClojureScript.

Thanks in advance, Leon.


On Friday, October 30, 2015 at 9:54:01 AM UTC+1, Thomas Heller wrote:
> This is very likely to break :advanced optimisations, did you test that yet?
> 
> Probably not what you are looking for but there is a "goog.ui.Textarea" [1,2] 
> in the closure library which does the auto-sizing as well. Should be pretty 
> straighforward to make a react-wrapper for it.
> 
> HTH,
> /thomas
> 
> [1] 
> https://github.com/google/closure-library/blob/master/closure/goog/ui/textarea.js
> [2] 
> https://google.github.io/closure-library/source/closure/goog/demos/textarea.html
> 
> On Friday, October 30, 2015 at 12:51:22 AM UTC+1, Leon Grapenthin wrote:
> > I solved this by compiling the library to UMD using webpack.  Also, babel 
> > is required as a loader to compile ES6 and JS6.
> > 
> > It might be worthwhile to write a beginners guide about how to deal with 
> > the Javascript module world for people who never used JS as their first 
> > language.  I'd do it myself but lack expertise. 
> > 
> > In any case, here is the webpack configuration file I wrote to get the 
> > above package to compile so that it can be included via :module-type 
> > :commonjs - Your input is very welcome.
> > 
> > module.exports = {
> > entry: "./src/TextareaAutosize.js",
> > module: {
> > loaders: [
> > {
> > test: /\.js$/,
> > loader: "babel?stage=0"
> > }],
> > },
> > output: {
> > path: __dirname + "/dist",
> > filename: "result.js",
> > libraryTarget: "umd",
> > library: "TextareaAutosize"
> > },
> > externals: {
> > "react": {root: "React"}
> > }
> > }

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: How can I import this foreign lib.

2015-10-30 Thread Thomas Heller
Interesting. I might need to try webpack to pre-process files before letting 
closure convert them. I made some attempts including common-js files into a 
build and most of it broke in some way.

I assume you are including react via the normal foreign cljsjs.react?

I don't have a recommended pipeline as the feature simply has not worked for me 
in :advanced.

On Friday, October 30, 2015 at 11:19:25 AM UTC+1, Leon Grapenthin wrote:
> Thanks Thomas for the link regarding the textarea, I might want to try that.
> 
> However I'd be very interested to learn why I should expect that this breaks 
> advanced optimization (luckily it doesn't).
> 
> What is your recommended pipeline? I. e. what module-type should I 
> comp/transpile foreign libs to before adding them to ClojureScript. It seems 
> that webpack is very flexible in that regard so all I'd have to know is what 
> is best for ClojureScript.
> 
> Thanks in advance, Leon.
> 
> 
> On Friday, October 30, 2015 at 9:54:01 AM UTC+1, Thomas Heller wrote:
> > This is very likely to break :advanced optimisations, did you test that yet?
> > 
> > Probably not what you are looking for but there is a "goog.ui.Textarea" 
> > [1,2] in the closure library which does the auto-sizing as well. Should be 
> > pretty straighforward to make a react-wrapper for it.
> > 
> > HTH,
> > /thomas
> > 
> > [1] 
> > https://github.com/google/closure-library/blob/master/closure/goog/ui/textarea.js
> > [2] 
> > https://google.github.io/closure-library/source/closure/goog/demos/textarea.html
> > 
> > On Friday, October 30, 2015 at 12:51:22 AM UTC+1, Leon Grapenthin wrote:
> > > I solved this by compiling the library to UMD using webpack.  Also, babel 
> > > is required as a loader to compile ES6 and JS6.
> > > 
> > > It might be worthwhile to write a beginners guide about how to deal with 
> > > the Javascript module world for people who never used JS as their first 
> > > language.  I'd do it myself but lack expertise. 
> > > 
> > > In any case, here is the webpack configuration file I wrote to get the 
> > > above package to compile so that it can be included via :module-type 
> > > :commonjs - Your input is very welcome.
> > > 
> > > module.exports = {
> > > entry: "./src/TextareaAutosize.js",
> > > module: {
> > > loaders: [
> > > {
> > > test: /\.js$/,
> > > loader: "babel?stage=0"
> > > }],
> > > },
> > > output: {
> > > path: __dirname + "/dist",
> > > filename: "result.js",
> > > libraryTarget: "umd",
> > > library: "TextareaAutosize"
> > > },
> > > externals: {
> > > "react": {root: "React"}
> > > }
> > > }

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


[ClojureScript] Re: ANN: Reanimated - An animation library for Reagent (ClojureScript)

2015-10-30 Thread Dylan Butman
On Thursday, October 29, 2015 at 11:46:55 PM UTC-4, Timothy Pratley wrote:
> Animation as reactions.
> 
> http://timothypratley.github.io/reanimated/#!/timothypratley.reanimated.examples
> https://github.com/timothypratley/reanimated
> 
> Regards,
> Timothy

Hey Timothy, cool stuff! You might get some additional mileage out of the 
interpolators and easing functions in 
https://github.com/pleasetrythisathome/bardo. Happy to see other people working 
with animation stuff

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.


Re: [ClojureScript] Re: ANN: Reanimated - An animation library for Reagent (ClojureScript)

2015-10-30 Thread marc . fawzi
React Native has a very intuitive animation API that you might want to copy it 
in such a way that when using Reagent with React Native you would simply use 
the built in API. Would that work?

Sent from my iPhone

> On Oct 30, 2015, at 12:44 PM, Dylan Butman  wrote:
> 
>> On Thursday, October 29, 2015 at 11:46:55 PM UTC-4, Timothy Pratley wrote:
>> Animation as reactions.
>> 
>> http://timothypratley.github.io/reanimated/#!/timothypratley.reanimated.examples
>> https://github.com/timothypratley/reanimated
>> 
>> Regards,
>> Timothy
> 
> Hey Timothy, cool stuff! You might get some additional mileage out of the 
> interpolators and easing functions in 
> https://github.com/pleasetrythisathome/bardo. Happy to see other people 
> working with animation stuff
> 
> -- 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> --- 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at http://groups.google.com/group/clojurescript.