These are chat archives for chandu0101/scalajs-react-components

25th
Feb 2017
Nicolas Rémond
@nremond
Feb 25 2017 14:13
Hello
I want to write a ScalaJS mapping for the following lib https://github.com/halt-hammerzeit/libphonenumber-js which uses the ES6 modules.
is there any exemple of a ScalaJS App that uses them?
I'm a bit confused about it and the documentation isn't so clear to me (https://www.scala-js.org/doc/project/module.html)
Chandra Sekhar Kode
@chandu0101
Feb 25 2017 14:21
@js.native
@JSImport("libphonenumber-js”,JSImport.NameSpace)
object LibPhoneNumber extends js.Object {
 def parse(text:String,options:js.Object):js.Object = js.native
}
try this ..
Nicolas Rémond
@nremond
Feb 25 2017 14:21
Thank you. I'm kind of understanding that part I think ...
my problem is more how to build an App that uses scalaJSModuleKind := ModuleKind.CommonJSModule
Chandra Sekhar Kode
@chandu0101
Feb 25 2017 14:23
use scalajs-bundler
Nicolas Rémond
@nremond
Feb 25 2017 14:26
Got it ! Thank you @chandu0101