Giter Site home page Giter Site logo

slinkydemos's Introduction

ScalablyTyped - The Javascript ecosystem for Scala.js!

Join the chat at https://gitter.im/ScalablyTyped/community

This is all example output of the ScalablyTyped Typescript to Scala.js converter.

Check out scalablytyped.org

About

This is one of the biggest Scala repos on the planet with with 0 compiling libraries.

.

The jar files with all the libraries from this repo used to be published to bintray. If you need to reconstruct exactly the jar files you had you can check out the repository from the date you have in your version number, and run sbt publishLocal yourself on the relevant libraries (with all dependencies).

slinkydemos's People

Contributors

alexitc avatar an-tex avatar dependabot[bot] avatar mcallisto avatar mn98 avatar mvillafuertem avatar oyvindberg avatar trepidacious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

slinkydemos's Issues

Running other sbt commands suspends the process

Run sbt clean:

[info] welcome to sbt 1.7.0 (Azul Systems, Inc. Java 17.0.1)
[info] loading global plugins from /Users/jason/.sbt/1.0/plugins
[info] loading settings for project slinkydemos-build from plugins.sbt,scalafmt.sbt ...
[info] loading project definition from /Users/jason/src/ScalablyTyped/SlinkyDemos/project
[info] loading settings for project slinkydemos from build.sbt ...
[info] resolving key references (21587 settings) ...
*
* Welcome to ScalablyTyped demos!
*
* These demos demonstrate how to use third party react components with Slinky.
*
* For documentation see https://scalablytyped.org .
*
* Note that when you change any conversion options or add/remove libraries a new conversion will be triggered.
* This is somewhat slow (could be minutes, depending) but it'll only happen once for a given conversion.
* If the conversion runs in a memory-constrained context like an IDE import, it might take MUCH longer.
*
[info] set current project to slinkydemos (in build file:/Users/jason/src/ScalablyTyped/SlinkyDemos/)
[1]  + 16566 suspended (tty input)  sbt clean

Any idea what is doing that?

Running sbt antd/start works fine.

cytoscape demo: digital envelope routines:: unsupported

Hi,

I'm getting this error when trying to run the cytoscape demo. Any help is much appreciated!

> cytoscape / start
[info] Updating NPM dependencies
[info] Using lockfile /home/snuc/sandbox/SlinkyDemos/cytoscape/yarn.loc
[info] yarn install v1.22.19
[info] [1/4] Resolving packages...
[info] compiling 1 Scala source to /home/snuc/sandbox/SlinkyDemos/cytos
[info] [2/4] Fetching packages...
[info] Non-compiled module 'compiler-bridge_2.13' for Scala 2.13.2. Com
[info] [3/4] Linking dependencies...
[info] [4/4] Building fresh packages...
[info] Done in 8.17s.
8 warnings
[info]   Compilation completed in 8.359s.
[info] done compiling
[info] Fast optimizing /home/snuc/sandbox/SlinkyDemos/cytoscape/target/
[info] Writing scalajs.webpack.config.js
[info] Bundling the application with its NPM dependencies
[error] node:internal/crypto/hash:71
[error]   this[kHandle] = new _Hash(algorithm, xofLen);
[error]                   ^
[error] Error: error:0308010C:digital envelope routines::unsupported
TRACE_AT: at new Hash (node:internal/crypto/hash:71:19)
TRACE_AT: at Object.createHash (node:crypto:133:10)
TRACE_AT: at BulkUpdateDecorator.hashFactory (/home/snuc/sandbox/Slinky
TRACE_AT: at BulkUpdateDecorator.update (/home/snuc/sandbox/SlinkyDemos
TRACE_AT: at RawSource.updateHash (/home/snuc/sandbox/SlinkyDemos/cytos
TRACE_AT: at NormalModule._initBuildHash (/home/snuc/sandbox/SlinkyDemo
TRACE_AT: at handleParseResult (/home/snuc/sandbox/SlinkyDemos/cytoscap
[error]     at /home/snuc/sandbox/SlinkyDemos/cytoscape/target/scala-2.
TRACE_AT: at processResult (/home/snuc/sandbox/SlinkyDemos/cytoscape/ta
[error]     at /home/snuc/sandbox/SlinkyDemos/cytoscape/target/scala-2.
[error]   opensslErrorStack: [ 'error:03000086:digital envelope routine
[error]   library: 'digital envelope routines',
[error]   reason: 'unsupported',
[error]   code: 'ERR_OSSL_EVP_UNSUPPORTED'
[error] }
[error] Node.js v18.16.0
[error] Failure on parsing the output of webpack: No content to map due
[error]  at [Source: (ProcessPipeInputStream); line: 1, column: 0]
[error] You can try to manually execute the command
[error] node /home/snuc/sandbox/SlinkyDemos/cytoscape/target/scala-2.13
[error] 
[error] stack trace is suppressed; run 'last cytoscape / Compile / fast
[�[31merror�[0m] Total time: 15 s, completed Jun 17, 2023 12:21:20 PM

react-navigation module setup

Hello @oyvindberg

I am proposing that another demo worth adding is react-navigation.

It seems to be a very popular choice for writing good React Native mobile apps, see the official demo on Expo, providing a solid foundation of both routing and layout elements to build on.

Based on the above rationale, I am giving it a try in the dedicated navigation branch.

But, of course, I ran into problems from the very beginning...

Despite having allocated up to -Xmx16384M to sbt, when I try running the module I get the following error:

[error] PhaseRes.scala:87 StackOverflowError [thread => 165, project => react-navigation, ms => 18560, phase => typescript, id => react-native-reanimated]java.lang.StackOverflowError

Is it something you can reproduce? Any idea on possible solutions?

Native Image as local asset

It should be easy, but it is not... so I think having it solved in the demo could be quite useful for others.

How to show in React Native a local image?

I am working on a solution in the react-native-assets branch... But I cannot find where to place the asset in order to JSImport it.

I keep getting
Unable to resolve "assets/scala-logo.png" from "target/scala-2.13/react-native-fastopt.js"
or "./assets/scala-logo.png"

I tried to put the assets directory under react-native, under react-native/src, under react-native/src/main and react-native/src/main/js, but no success.

Any suggestion?

java.io.IOException: Cannot run program "yarn"

I get this error, when I try to open the project with IntelliJ IDEA. Any suggestion is welcome. Thanks

[info] Set current project to slinkydemos (in build file:/tmp/SlinkyDemos/)
[error] stack trace is suppressed; run 'last react-native / externalNpm' for the full output
[error] stack trace is suppressed; run 'last storybook-react / externalNpm' for the full output
[error] stack trace is suppressed; run 'last react-native / ssExtractDependencies' for the full output
[error] stack trace is suppressed; run 'last storybook-react / ssExtractDependencies' for the full output
[error] (react-native / externalNpm) java.io.IOException: Cannot run program "yarn" (in directory "/tmp/SlinkyDemos/react-native"): error=2, No such file or directory
[error] (storybook-react / externalNpm) java.io.IOException: Cannot run program "yarn" (in directory "/tmp/SlinkyDemos/storybook-react"): error=2, No such file or directory
[error] (react-native / ssExtractDependencies) java.io.IOException: Cannot run program "yarn" (in directory "/tmp/SlinkyDemos/react-native"): error=2, No such file or directory
[error] (storybook-react / ssExtractDependencies) java.io.IOException: Cannot run program "yarn" (in directory "/tmp/SlinkyDemos/storybook-react"): error=2, No such file or directory
[error] Total time: 3 s, completed 31 Mar 2020, 11:46:35
[info] shutting down sbt server)
$ sw_vers

ProductName:    Mac OS X
ProductVersion: 10.15.3
BuildVersion:   19D76

$ which yarn

/usr/local/bin/yarn

$ yarn --version

1.22.4

Using moment.js or days.js for localized duration

I cannot find the way in React Native to localize moment.js duration strings (or other dates/times objects).
The issue seems to be how to set the needed locale data, that I am convinced is stored in the library.
https://momentjs.com/docs/#/i18n/loading-into-nodejs/
https://momentjs.com/docs/#/i18n/getting-locale/

I also imported day.js to try an alternative, but stuck at the same point.
https://day.js.org/docs/en/i18n/loading-into-nodejs

Any idea? I have written a small exercise with 38dcd39 in the native-duration-locale branch.

I was coming from antd for React (web) that bundles moment.js and seems to have all locales already set. The code I am proposing would have produced localized durations in Spanish, French and Italian.

But here, as shown below, nothing happens:

Screenshot_1611357047

antd/start and antd/dist failing

I just cloned the latest version of the repo.

While sbt> react-router-dom/start works fine, if I run sbt> antd/start I get the following error:

[IJ]sbt:slinkydemos> antd/start
[info] Writing scalajs.webpack.config.js
[info] Bundling the application with its NPM dependencies
[error] /.../SlinkyDemos/antd/target/scala-2.13/scalajs-bundler/main/node_modules/webpack-cli/bin/cli.js:74
[error] 				throw err;
[error] 				^
[error] Error: Cannot find module './_baseValues'
[error]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
[error]     at Function.Module._load (internal/modules/cjs/loader.js:562:25)
[error]     at Module.require (internal/modules/cjs/loader.js:692:17)
...

The same happens with sbt> antd/dist.

@oyvindberg is it me or is it something you can reproduce on your side?

i18next interpolation

While plurals and context are both fine in the current demo, I cannot find a way to make interpolation work.

I wrote some (failing...) code around here

// div(t("The author is", TOptionsBase().setInterpolation(InterpolationOptions().setDefaultVariables(StringDictionary("author" -> "John")))))

getting always the same error
i18next::interpolator: missed to pass in variable author for interpolating The author is {{author}}

Use latest versions

Sometimes I find that I run into issues with ST when updating to the latest libraries. I'll try and come here and reproduce them and add them to the test set. It would be good if there was a way to keep the npmDependencies on the latest.

Once scala-steward-org/scala-steward#1585 is implemented this would be trivial.

expo-av playing sound from an url

Hi @oyvindberg, I have been also trying to use the converted Expo Audio lib to play a sound from the internet.

Made some experiment on a dedicated expo-av branch.

To begin with, the createSound method wants an AVPlaybackSource that is defined as

type AVPlaybackSource = scala.scalajs.js.|[scala.scalajs.js.|[scala.Double, typings.expoAv.anon.Headers], typings.expoAsset.mod.Asset]

it seems there is no way to pass a simple uri: String.

Any suggestion on how to solve this?

Expo constants not working

As shown in the dedicated constants branch, for some reason is not possible to obtain the correct value for any of the Expo Constants.

In the Home page of the demo I obtain

The status bar is 0 pixels high
Expo version is null

Anyone has any idea on how to get them right?

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.